diff options
author | Anton Khirnov <anton@khirnov.net> | 2015-04-17 12:09:50 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2015-04-29 05:52:58 +0200 |
commit | a0f2946068c62e18cb05ac25c0df3d86077251a6 (patch) | |
tree | 0b50e018335447012922f2e059b25f89405e4d94 /libavcodec/h264_refs.c | |
parent | 7a4f74eed51f914e9bbfebaffd4a92ac6791f819 (diff) | |
download | ffmpeg-a0f2946068c62e18cb05ac25c0df3d86077251a6.tar.gz |
h264: use properly allocated AVFrames
Diffstat (limited to 'libavcodec/h264_refs.c')
-rw-r--r-- | libavcodec/h264_refs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c index 1ee43b7c57..2ddbdb7052 100644 --- a/libavcodec/h264_refs.c +++ b/libavcodec/h264_refs.c @@ -49,8 +49,8 @@ static void pic_as_field(H264Ref *pic, const int parity) static void ref_from_h264pic(H264Ref *dst, H264Picture *src) { - memcpy(dst->data, src->f.data, sizeof(dst->data)); - memcpy(dst->linesize, src->f.linesize, sizeof(dst->linesize)); + memcpy(dst->data, src->f->data, sizeof(dst->data)); + memcpy(dst->linesize, src->f->linesize, sizeof(dst->linesize)); dst->reference = src->reference; dst->poc = src->poc; dst->pic_id = src->pic_id; @@ -151,8 +151,8 @@ int ff_h264_fill_default_ref_list(H264Context *h, H264SliceContext *sl) if (lens[0] == lens[1] && lens[1] > 1) { for (i = 0; i < lens[0] && - h->default_ref_list[0][i].parent->f.buf[0]->buffer == - h->default_ref_list[1][i].parent->f.buf[0]->buffer; i++); + h->default_ref_list[0][i].parent->f->buf[0]->buffer == + h->default_ref_list[1][i].parent->f->buf[0]->buffer; i++); if (i == lens[0]) { FFSWAP(H264Ref, h->default_ref_list[1][0], h->default_ref_list[1][1]); } @@ -172,14 +172,14 @@ int ff_h264_fill_default_ref_list(H264Context *h, H264SliceContext *sl) ff_tlog(h->avctx, "List0: %s fn:%d 0x%p\n", (h->default_ref_list[0][i].long_ref ? "LT" : "ST"), h->default_ref_list[0][i].pic_id, - h->default_ref_list[0][i].f.data[0]); + h->default_ref_list[0][i].f->data[0]); } if (sl->slice_type_nos == AV_PICTURE_TYPE_B) { for (i = 0; i < sl->ref_count[1]; i++) { ff_tlog(h->avctx, "List1: %s fn:%d 0x%p\n", (h->default_ref_list[1][i].long_ref ? "LT" : "ST"), h->default_ref_list[1][i].pic_id, - h->default_ref_list[1][i].f.data[0]); + h->default_ref_list[1][i].f->data[0]); } } #endif @@ -355,7 +355,7 @@ void ff_h264_fill_mbaff_ref_list(H264Context *h, H264SliceContext *sl) field[1] = field[0]; for (j = 0; j < 3; j++) - field[1].data[j] += frame->parent->f.linesize[j]; + field[1].data[j] += frame->parent->f->linesize[j]; field[1].reference = PICT_BOTTOM_FIELD; field[1].poc = field[1].parent->field_poc[1]; @@ -504,7 +504,7 @@ static void print_short_term(H264Context *h) for (i = 0; i < h->short_ref_count; i++) { H264Picture *pic = h->short_ref[i]; av_log(h->avctx, AV_LOG_DEBUG, "%"PRIu32" fn:%d poc:%d %p\n", - i, pic->frame_num, pic->poc, pic->f.data[0]); + i, pic->frame_num, pic->poc, pic->f->data[0]); } } } @@ -521,7 +521,7 @@ static void print_long_term(H264Context *h) H264Picture *pic = h->long_ref[i]; if (pic) { av_log(h->avctx, AV_LOG_DEBUG, "%"PRIu32" fn:%d poc:%d %p\n", - i, pic->frame_num, pic->poc, pic->f.data[0]); + i, pic->frame_num, pic->poc, pic->f->data[0]); } } } |