From d66e305bd1b4f3e91ae4e7e549148509d0811672 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 28 Feb 2014 11:31:56 +0100 Subject: er: move relevant fields from Picture to ERPicture This is done to disentangle ER from mpegvideo. In order to use a classic Picture, callers can use ff_mpeg_set_erpic() or use a custom function to set the fields. Please note that buffers need to be allocated before calling ff_er_frame_end(). --- libavcodec/h264.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libavcodec/h264.c') diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 1ce772fa3f..a6724846cc 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2974,9 +2974,11 @@ static int field_end(H264Context *h, int in_setup) * causes problems for the first MB line, too. */ if (CONFIG_ERROR_RESILIENCE && !FIELD_PICTURE(h)) { - h->er.cur_pic = h->cur_pic_ptr; - h->er.last_pic = h->ref_count[0] ? &h->ref_list[0][0] : NULL; - h->er.next_pic = h->ref_count[1] ? &h->ref_list[1][0] : NULL; + ff_mpeg_set_erpic(&h->er.cur_pic, h->cur_pic_ptr); + ff_mpeg_set_erpic(&h->er.last_pic, + h->ref_count[0] ? &h->ref_list[0][0] : NULL); + ff_mpeg_set_erpic(&h->er.next_pic, + h->ref_count[1] ? &h->ref_list[1][0] : NULL); ff_er_frame_end(&h->er); } emms_c(); -- cgit v1.2.3