summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-12-09 11:51:31 +0100
committerAnton Khirnov <anton@khirnov.net>2013-12-11 20:39:55 +0100
commit598ce4ab4f1893e0661fc038101487e511937877 (patch)
tree7bd41606b56a420f9a0ccff22006beb320776b49 /libavcodec
parent48d17ee6dc2b2a552f645484f200c2946bf24607 (diff)
h264: call av_frame_unref() instead of avcodec_get_frame_defaults().
This is a temporary workaround to allow deprecating avcodec_get_frame_defaults(). The proper solution will be using a properly allocated AVFrame in Picture.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 29a69608ec..07a93cfc9b 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1341,8 +1341,8 @@ int ff_h264_alloc_tables(H264Context *h)
if (!h->DPB)
return AVERROR(ENOMEM);
for (i = 0; i < MAX_PICTURE_COUNT; i++)
- avcodec_get_frame_defaults(&h->DPB[i].f);
- avcodec_get_frame_defaults(&h->cur_pic.f);
+ av_frame_unref(&h->DPB[i].f);
+ av_frame_unref(&h->cur_pic.f);
}
return 0;
@@ -1721,7 +1721,7 @@ static int decode_update_thread_context(AVCodecContext *dst,
h->context_initialized = 0;
memset(&h->cur_pic, 0, sizeof(h->cur_pic));
- avcodec_get_frame_defaults(&h->cur_pic.f);
+ av_frame_unref(&h->cur_pic.f);
h->cur_pic.tf.f = &h->cur_pic.f;
h->avctx = dst;