diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-19 03:48:15 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-19 03:56:53 +0100 |
commit | 56e122787e7362274b7ac342fde6e303259a5f57 (patch) | |
tree | 6b87895ea4cc938fea927e5e27ceed77c9519e6a /libavcodec/h264.c | |
parent | f0f04fd8429475999bde08943e29a678cab3926e (diff) | |
parent | a553c6a347d3d28d7ee44c3df3d5c4ee780dba23 (diff) | |
download | ffmpeg-56e122787e7362274b7ac342fde6e303259a5f57.tar.gz |
Merge commit 'a553c6a347d3d28d7ee44c3df3d5c4ee780dba23'
* commit 'a553c6a347d3d28d7ee44c3df3d5c4ee780dba23':
lavc: use buf[0] instead of data[0] in checks whether a frame is allocated
Conflicts:
libavcodec/h264_refs.c
libavcodec/mpegvideo.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 3d269e9f3e..9110746d3f 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -281,7 +281,7 @@ static void unref_picture(H264Context *h, Picture *pic) int off = offsetof(Picture, tf) + sizeof(pic->tf); int i; - if (!pic->f.data[0]) + if (!pic->f.buf[0]) return; ff_thread_release_buffer(h->avctx, &pic->tf); @@ -303,7 +303,7 @@ static void release_unused_pictures(H264Context *h, int remove_current) /* release non reference frames */ for (i = 0; i < MAX_PICTURE_COUNT; i++) { - if (h->DPB[i].f.data[0] && !h->DPB[i].reference && + if (h->DPB[i].f.buf[0] && !h->DPB[i].reference && (remove_current || &h->DPB[i] != h->cur_pic_ptr)) { unref_picture(h, &h->DPB[i]); } @@ -485,7 +485,7 @@ fail: static inline int pic_is_unused(H264Context *h, Picture *pic) { - if (pic->f.data[0] == NULL) + if (!pic->f.buf[0]) return 1; if (pic->needs_realloc && !(pic->reference & DELAYED_PIC_REF)) return 1; @@ -1850,7 +1850,7 @@ static int decode_update_thread_context(AVCodecContext *dst, for (i = 0; h->DPB && i < MAX_PICTURE_COUNT; i++) { unref_picture(h, &h->DPB[i]); - if (h1->DPB[i].f.data[0] && + if (h1->DPB[i].f.buf[0] && (ret = ref_picture(h, &h->DPB[i], &h1->DPB[i])) < 0) return ret; } @@ -3644,7 +3644,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) * since that can modify h->cur_pic_ptr. */ if (h0->first_field) { assert(h0->cur_pic_ptr); - assert(h0->cur_pic_ptr->f.data[0]); + assert(h0->cur_pic_ptr->f.buf[0]); assert(h0->cur_pic_ptr->reference != DELAYED_PIC_REF); /* Mark old field/frame as completed */ @@ -3743,7 +3743,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0) * frame, or to allocate a new one. */ if (h0->first_field) { assert(h0->cur_pic_ptr); - assert(h0->cur_pic_ptr->f.data[0]); + assert(h0->cur_pic_ptr->f.buf[0]); assert(h0->cur_pic_ptr->reference != DELAYED_PIC_REF); /* figure out if we have a complementary field pair */ @@ -5174,7 +5174,7 @@ not_extra: } } - assert(pict->data[0] || !*got_frame); + assert(pict->buf[0] || !*got_frame); return get_consumed_bytes(buf_index, buf_size); } |