diff options
author | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-03-12 18:58:08 +0000 |
---|---|---|
committer | nicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-03-12 18:58:08 +0000 |
commit | f7cdaa9cba185d5f4a3d7f36db2d480582ab34ce (patch) | |
tree | 5490106eb5769ae07675884ca8649912c2f73d6e /libmpdemux/muxer_lavf.c | |
parent | 7519cfa52889b40dc967d7f5aafd472ecfadaf14 (diff) |
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
Diffstat (limited to 'libmpdemux/muxer_lavf.c')
-rw-r--r-- | libmpdemux/muxer_lavf.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |