[MPlayer-cvslog] r20487 - trunk/libmpdemux/demux_ts.c
nicodvb
subversion at mplayerhq.hu
Sat Oct 28 12:52:12 CEST 2006
Author: nicodvb
Date: Sat Oct 28 12:52:12 2006
New Revision: 20487
Modified:
trunk/libmpdemux/demux_ts.c
Log:
unconditionally assign the language code when available;
more simplifications
Modified: trunk/libmpdemux/demux_ts.c
==============================================================================
--- trunk/libmpdemux/demux_ts.c (original)
+++ trunk/libmpdemux/demux_ts.c Sat Oct 28 12:52:12 2006
@@ -2864,6 +2864,8 @@
if(is_start)
{
+ uint8_t *lang = NULL;
+
mp_msg(MSGT_DEMUX, MSGL_DBG2, "IS_START\n");
p = &packet[base];
@@ -2878,27 +2880,26 @@
}
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 @@
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)
More information about the MPlayer-cvslog
mailing list