diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-10-29 21:29:23 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-10-29 21:29:23 +0000 |
commit | 6d60c545d425884e6fb3f746234b20f42d4a1a38 (patch) | |
tree | 634cc4787bd48c4db5028c96db673aa38779e819 /libmpdemux | |
parent | 9774de4be487f9821e09fe77fe83da5b5fe932d7 (diff) |
simplified assignment of subtitles stream in ts_parse()
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@20522 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/demux_ts.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/libmpdemux/demux_ts.c b/libmpdemux/demux_ts.c index 03318c7f01..324458583c 100644 --- a/libmpdemux/demux_ts.c +++ b/libmpdemux/demux_ts.c @@ -2747,17 +2747,11 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet, if(dvdsub_lang) { - if(!strcmp(dvdsub_lang, "")) - asgn = 1; - else - { - lang = pid_lang_from_pmt(priv, pid); - if(lang != NULL) - asgn = (strncmp(lang, dvdsub_lang, 3) == 0); - else - asgn = 0; - } + if(lang = pid_lang_from_pmt(priv, pid)) + asgn = (strncmp(lang, dvdsub_lang, 3) == 0); } + else //no language specified with -slang + asgn = 1; if(asgn) { @@ -2765,10 +2759,6 @@ static int ts_parse(demuxer_t *demuxer , ES_stream_t *es, unsigned char *packet, mp_msg(MSGT_DEMUX, MSGL_INFO, "CHOSEN SUBs pid 0x%x (%d) FROM PROG %d\n", tss->pid, tss->pid, priv->prog); } } - else - { - mp_msg(MSGT_DEMUX, MSGL_V, "DISCARDED SUBs pid 0x%x (%d) NOT CHOSEN OR NOT IN PROG %d\n", tss->pid, tss->pid, priv->prog); - } } if(demuxer->sub->id == tss->pid) |