[MPlayer-cvslog] CVS: main/libmpdemux muxer_lavf.c,1.25,1.26

Michael Niedermayer michaelni at gmx.at
Sun Mar 12 21:54:03 CET 2006


Hi

On Sun, Mar 12, 2006 at 07:58:11PM +0100, Nico Sabbi CVS wrote:
> CVS change done by Nico Sabbi CVS
> 
> Update of /cvsroot/mplayer/main/libmpdemux
> In directory mail:/var2/tmp/cvs-serv7308
> 
> Modified Files:
> 	muxer_lavf.c 
> Log Message:
> check stream->wf and stream->bih before using them in fix_parameters(). Fixes cid 43
> 
> Index: muxer_lavf.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_lavf.c,v
> retrieving revision 1.25
> retrieving revision 1.26
> diff -u -r1.25 -r1.26
> --- muxer_lavf.c	12 Mar 2006 18:11:32 -0000	1.25
> +++ muxer_lavf.c	12 Mar 2006 18:58:08 -0000	1.26
> @@ -191,6 +191,8 @@
>  
>  	if(stream->type == MUXER_TYPE_AUDIO)
>  	{
> +		if(!stream->wf)
> +			return;
>  		ctx->codec_id = codec_get_wav_id(stream->wf->wFormatTag); 
>  #if 0 //breaks aac in mov at least
>  		ctx->codec_tag = codec_get_wav_tag(ctx->codec_id);
> @@ -220,6 +222,8 @@
>  	}
>  	else if(stream->type == MUXER_TYPE_VIDEO)
>  	{
> +		if(!stream->bih)
> +			return;

neither of these changes looks correct, REVERSE!

either wf&bih are guranteed to be set OR the code should be changed to
work without them OR you should print an error / assert(0) whatever
this hides the problem instead of fixing it

[...]
-- 
Michael




More information about the MPlayer-cvslog mailing list