diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-12-17 14:54:29 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-12-17 15:45:24 +0100 |
commit | c5f7c8f9a9a1a2f3fb9c0bc224c90fe69ef49cf0 (patch) | |
tree | 3ef600c5ac55f40f6dcb1b92b5392e412f1a8429 /libavcodec/svq3.c | |
parent | 5abdda214df53f009434f19b9eb8e1375f2924d9 (diff) | |
download | ffmpeg-c5f7c8f9a9a1a2f3fb9c0bc224c90fe69ef49cf0.tar.gz |
avcodec/svq3: set last/next frames to defaults before use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/svq3.c')
-rw-r--r-- | libavcodec/svq3.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/svq3.c b/libavcodec/svq3.c index f24f2e4b1d..e1d25885c6 100644 --- a/libavcodec/svq3.c +++ b/libavcodec/svq3.c @@ -1187,6 +1187,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, if (h->pict_type != AV_PICTURE_TYPE_I) { if (!s->last_pic->f.data[0]) { av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n"); + av_frame_unref(s->last_pic); ret = get_buffer(avctx, s->last_pic); if (ret < 0) return ret; @@ -1199,6 +1200,7 @@ static int svq3_decode_frame(AVCodecContext *avctx, void *data, if (h->pict_type == AV_PICTURE_TYPE_B && !s->next_pic->f.data[0]) { av_log(avctx, AV_LOG_ERROR, "Missing reference frame.\n"); + av_frame_unref(s->next_pic); ret = get_buffer(avctx, s->next_pic); if (ret < 0) return ret; |