changeset 20506:9324e1a02a8b

simplified assignment of subtitles stream in ts_parse()
author nicodvb
date Sun, 29 Oct 2006 21:29:23 +0000
parents 543f6e8deeb6
children d03b71ab8b65
files libmpdemux/demux_ts.c
diffstat 1 files changed, 4 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_ts.c	Sun Oct 29 21:10:59 2006 +0000
+++ b/libmpdemux/demux_ts.c	Sun Oct 29 21:29:23 2006 +0000
@@ -2747,17 +2747,11 @@
 
 						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 @@
 							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)