From f7cdaa9cba185d5f4a3d7f36db2d480582ab34ce Mon Sep 17 00:00:00 2001 From: nicodvb Date: Sun, 12 Mar 2006 18:58:08 +0000 Subject: check stream->wf and stream->bih before using them in fix_parameters(). Fixes cid 43 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17834 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/muxer_lavf.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libmpdemux') diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c index f182cbb8bf..25e2fff5b8 100644 --- a/libmpdemux/muxer_lavf.c +++ b/libmpdemux/muxer_lavf.c @@ -191,6 +191,8 @@ static void fix_parameters(muxer_stream_t *stream) 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 @@ static void fix_parameters(muxer_stream_t *stream) } 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; -- cgit v1.2.3