From: bcoudurier Date: Mon, 13 Apr 2009 03:38:55 +0000 (+0000) Subject: Set frame defaults in try_decode_frame. X-Git-Url: https://rtime.felk.cvut.cz/gitweb/frescor/ffmpeg.git/commitdiff_plain/2949b905eee70c385c40cd60166256fd6ff44f3a Set frame defaults in try_decode_frame. Fix: ==22211== Conditional jump or move depends on uninitialised value(s) ==22211== at 0x811E692: ff_print_debug_info (mpegvideo.c:1137) ==22211== by 0x82E6A7B: decode_frame (h264.c:7897) ==22211== by 0x80F2823: avcodec_decode_video2 (utils.c:564) [...] ==22211== Uninitialised value was created by a stack allocation ==22211== at 0x8064AA3: try_decode_frame (utils.c:1845) git-svn-id: file:///var/local/repositories/ffmpeg/trunk@18483 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b --- diff --git a/libavformat/utils.c b/libavformat/utils.c index df45f9efc..bdf168ae9 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1860,6 +1860,7 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt) if(!has_codec_parameters(st->codec)){ switch(st->codec->codec_type) { case CODEC_TYPE_VIDEO: + avcodec_get_frame_defaults(&picture); ret = avcodec_decode_video2(st->codec, &picture, &got_picture, avpkt); break;