1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-20 06:11:10 +00:00

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
This commit is contained in:
nicodvb 2006-03-12 18:58:08 +00:00
parent 7519cfa528
commit f7cdaa9cba

View File

@ -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;