[MPlayer-cvslog] CVS: main/libmpdemux demux_mpg.c,1.76,1.77

Nico Sabbi CVS syncmail at mplayerhq.hu
Sun Mar 12 13:28:12 CET 2006


CVS change done by Nico Sabbi CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv12974

Modified Files:
	demux_mpg.c 
Log Message:
fail immediately if any of the parameters necessary to switch audio stream isn't set/correct; closes cid 55

Index: demux_mpg.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_mpg.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- demux_mpg.c	12 Mar 2006 12:13:37 -0000	1.76
+++ demux_mpg.c	12 Mar 2006 12:28:09 -0000	1.77
@@ -816,11 +816,15 @@
 	    return DEMUXER_CTRL_DONTKNOW;
 
 	case DEMUXER_CTRL_SWITCH_AUDIO:
-            if (mpg_d && mpg_d->num_a_streams > 1 && demuxer->audio && demuxer->audio->sh) {
+            if(! (mpg_d && mpg_d->num_a_streams > 1 && demuxer->audio && demuxer->audio->sh))
+	      return DEMUXER_CTRL_NOTIMPL; 
+	    else {
               demux_stream_t *d_audio = demuxer->audio;
               sh_audio_t *sh_audio = d_audio->sh;
               sh_audio_t *sh_a = sh_audio;
               int i;
+	      if(!sh_audio)
+	        return DEMUXER_CTRL_NOTIMPL;
               if (*((int*)arg) < 0)
               {
               for (i = 0; i < mpg_d->num_a_streams; i++) {




More information about the MPlayer-cvslog mailing list