[MPlayer-cvslog] r37201 - trunk/libmpdemux/demux_real.c

reimar subversion at mplayerhq.hu
Tue May 13 23:06:40 CEST 2014


Author: reimar
Date: Tue May 13 23:06:39 2014
New Revision: 37201

Log:
demux_real: remove code that new_sh_* already handles.

Also makes it easier to check that ->id and ->sh are always
consistent.

Modified:
   trunk/libmpdemux/demux_real.c

Modified: trunk/libmpdemux/demux_real.c
==============================================================================
--- trunk/libmpdemux/demux_real.c	Tue May 13 23:06:38 2014	(r37200)
+++ trunk/libmpdemux/demux_real.c	Tue May 13 23:06:39 2014	(r37201)
@@ -1505,14 +1505,11 @@ static demuxer_t* demux_open_real(demuxe
 		    if (priv->is_multirate && ((demuxer->audio->id == -1) ||
 		                               ((demuxer->audio->id >= 0) && priv->a_bitrate && (bitrate > priv->a_bitrate)))) {
 			    demuxer->audio->id = stream_id;
+			    demuxer->audio->sh = sh;
 			    priv->a_bitrate = bitrate;
 			    mp_msg(MSGT_DEMUX,MSGL_DBG2,"Multirate autoselected audio id %d with bitrate %d\n", stream_id, bitrate);
 		    }
 
-		    if(demuxer->audio->id==stream_id){
-			demuxer->audio->sh=sh;
-		    }
-
 		    ++a_streams;
 
 #ifdef stream_skip
@@ -1534,10 +1531,6 @@ static demuxer_t* demux_open_real(demuxe
 		    sh->wf->cbSize = 0;
 		    sh->wf->wFormatTag = sh->format = mmioFOURCC('a','d','u',0x55);
 
-		    if(demuxer->audio->id==stream_id){
-			    demuxer->audio->sh=sh;
-		    }
-
 		    ++a_streams;
 	  } else if (strstr(mimet,"x-ralf-mpeg4")) {
 		    sh_audio_t *sh = new_sh_audio(demuxer, stream_id, NULL);
@@ -1675,14 +1668,11 @@ static demuxer_t* demux_open_real(demuxe
 		    if (priv->is_multirate && ((demuxer->video->id == -1) ||
 		                               ((demuxer->video->id >= 0) && priv->v_bitrate && (bitrate > priv->v_bitrate)))) {
 			    demuxer->video->id = stream_id;
+			    demuxer->video->sh = sh;
 			    priv->v_bitrate = bitrate;
 			    mp_msg(MSGT_DEMUX,MSGL_DBG2,"Multirate autoselected video id %d with bitrate %d\n", stream_id, bitrate);
 		    }
 
-		    if(demuxer->video->id==stream_id){
-			demuxer->video->sh=sh;
-		    }
-
 		    ++v_streams;
 
 		} // VIDO


More information about the MPlayer-cvslog mailing list