# HG changeset patch # User nicodvb # Date 1142189888 0 # Node ID b3ee00937967f5b3dfa5ce5082791be5458627b7 # Parent 7fa8bfd0dea3a13bb48b83665c348815fccd255b check stream->wf and stream->bih before using them in fix_parameters(). Fixes cid 43 diff -r 7fa8bfd0dea3 -r b3ee00937967 libmpdemux/muxer_lavf.c --- a/libmpdemux/muxer_lavf.c Sun Mar 12 18:31:50 2006 +0000 +++ b/libmpdemux/muxer_lavf.c Sun Mar 12 18:58:08 2006 +0000 @@ -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; ctx->codec_id = codec_get_bmp_id(stream->bih->biCompression); if(ctx->codec_id <= 0) ctx->codec_tag= stream->bih->biCompression;