mirror of https://github.com/mpv-player/mpv
unconditionally assign the language code when available;
more simplifications git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20487 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8777fbb596
commit
fb8eec9d28
|
@ -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,17 +2880,7 @@ 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;
|
||||
|
||||
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);
|
||||
|
@ -2899,6 +2891,15 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet,
|
|||
}
|
||||
else
|
||||
es->lang[0] = 0;
|
||||
|
||||
if(probe)
|
||||
{
|
||||
if(es->type == UNKNOWN)
|
||||
return 0;
|
||||
|
||||
tss->type = es->type;
|
||||
tss->subtype = es->subtype;
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue