aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_picture.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2015-04-17 12:09:50 +0200
committerAnton Khirnov <anton@khirnov.net>2015-04-29 05:52:58 +0200
commita0f2946068c62e18cb05ac25c0df3d86077251a6 (patch)
tree0b50e018335447012922f2e059b25f89405e4d94 /libavcodec/h264_picture.c
parent7a4f74eed51f914e9bbfebaffd4a92ac6791f819 (diff)
downloadffmpeg-a0f2946068c62e18cb05ac25c0df3d86077251a6.tar.gz
h264: use properly allocated AVFrames
Diffstat (limited to 'libavcodec/h264_picture.c')
-rw-r--r--libavcodec/h264_picture.c12
1 files changed, 6 insertions, 6 deletions
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++) {