Mercurial > mplayer.hg
changeset 20471:0398b9cbd66d
unconditionally assign the language code when available;
more simplifications
author | nicodvb |
---|---|
date | Sat, 28 Oct 2006 10:52:12 +0000 |
parents | 054516eecb9b |
children | e7474c33f072 |
files | libmpdemux/demux_ts.c |
diffstat | 1 files changed, 13 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c Sat Oct 28 10:44:45 2006 +0000 +++ b/libmpdemux/demux_ts.c Sat Oct 28 10:52:12 2006 +0000 @@ -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)