From a0f2946068c62e18cb05ac25c0df3d86077251a6 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Fri, 17 Apr 2015 12:09:50 +0200 Subject: h264: use properly allocated AVFrames --- libavcodec/h264_picture.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavcodec/h264_picture.c') diff --git a/libavcodec/h264_picture.c b/libavcodec/h264_picture.c index 814599d4ea..3e2c84e566 100644 --- a/libavcodec/h264_picture.c +++ b/libavcodec/h264_picture.c @@ -48,7 +48,7 @@ void ff_h264_unref_picture(H264Context *h, H264Picture *pic) int off = offsetof(H264Picture, tf) + sizeof(pic->tf); int i; - if (!pic->f.buf[0]) + if (!pic->f || !pic->f->buf[0]) return; ff_thread_release_buffer(h->avctx, &pic->tf); @@ -68,11 +68,11 @@ int ff_h264_ref_picture(H264Context *h, H264Picture *dst, H264Picture *src) { int ret, i; - av_assert0(!dst->f.buf[0]); - av_assert0(src->f.buf[0]); + av_assert0(!dst->f->buf[0]); + av_assert0(src->f->buf[0]); - src->tf.f = &src->f; - dst->tf.f = &dst->f; + src->tf.f = src->f; + dst->tf.f = dst->f; ret = ff_thread_ref_frame(&dst->tf, &src->tf); if (ret < 0) goto fail; @@ -130,7 +130,7 @@ static void h264_set_erpic(ERPicture *dst, H264Picture *src) if (!src) return; - dst->f = &src->f; + dst->f = src->f; dst->tf = &src->tf; for (i = 0; i < 2; i++) { -- cgit v1.2.3