aboutsummaryrefslogtreecommitdiffhomepage
path: root/libmpdemux
diff options
context:
space:
mode:
authorGravatar nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-28 10:52:12 +0000
committerGravatar nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-10-28 10:52:12 +0000
commitfb8eec9d28565debd3642d869aada3cbb1d3ccba (patch)
tree874da183965c3ab9bc74439db0c5764063063e95 /libmpdemux
parent8777fbb596f55e7dbb5634ccc09e70a05fb0aca4 (diff)
unconditionally assign the language code when available;
more simplifications git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20487 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/demux_ts.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c
index 156ce704dd..82320dbe2e 100644
--- a/libmpdemux/demux_ts.c
+++ b/libmpdemux/demux_ts.c
@@ -2864,6 +2864,8 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
if(is_start)
{
+ uint8_t *lang = NULL;
+
mp_msg(MSGT_DEMUX, MSGL_DBG2, "IS_START\n");
p = &packet[base];
@@ -2878,27 +2880,26 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
}
es->pid = tss->pid;
tss->is_synced |= es->is_synced || rap_flag;
+ tss->payload_size = es->payload_size;
+
+ if(is_audio)
+ lang = pid_lang_from_pmt(priv, es->pid);
+ if(lang != NULL)
+ {
+ memcpy(es->lang, lang, 3);
+ es->lang[3] = 0;
+ }
+ else
+ es->lang[0] = 0;
if(probe)
{
- uint8_t *lang = NULL;
-
if(es->type == UNKNOWN)
return 0;
- tss->payload_size = es->payload_size;
tss->type = es->type;
tss->subtype = es->subtype;
- if(is_audio)
- lang = pid_lang_from_pmt(priv, es->pid);
- if(lang != NULL)
- {
- memcpy(es->lang, lang, 3);
- es->lang[3] = 0;
- }
- else
- es->lang[0] = 0;
return 1;
}
else
@@ -2911,8 +2912,6 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
mp_msg(MSGT_DEMUX, MSGL_DBG2, "ts_parse, NEW pid=%d, PSIZE: %u, type=%X, start=%p, len=%d\n",
es->pid, es->payload_size, es->type, es->start, es->size);
- tss->payload_size = es->payload_size;
-
demuxer->filepos = stream_tell(demuxer->stream) - es->size;
if(*dp_offset + es->size > *buffer_size)