diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-17 04:59:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-03-17 05:08:46 +0100 |
commit | 533bc4c0a30db6a6a4b75bb1094ad2e25f11ae51 (patch) | |
tree | bbbbf157d57e32706fb35e0add19bfb9f7e8bcc5 /libavcodec/h264.c | |
parent | 3dab9e804afe7f971a2dc6089c5615628fb4d81c (diff) | |
parent | d66e305bd1b4f3e91ae4e7e549148509d0811672 (diff) | |
download | ffmpeg-533bc4c0a30db6a6a4b75bb1094ad2e25f11ae51.tar.gz |
Merge commit 'd66e305bd1b4f3e91ae4e7e549148509d0811672'
* commit 'd66e305bd1b4f3e91ae4e7e549148509d0811672':
er: move relevant fields from Picture to ERPicture
Conflicts:
libavcodec/error_resilience.c
libavcodec/h264.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 4fdfacf1a5..297b7ab18c 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -1990,7 +1990,7 @@ static int h264_frame_start(H264Context *h) h->cur_pic_ptr = pic; unref_picture(h, &h->cur_pic); if (CONFIG_ERROR_RESILIENCE) { - h->er.cur_pic = NULL; + memset(&h->er.cur_pic, 0, sizeof(h->er.cur_pic)); } if ((ret = ref_picture(h, &h->cur_pic, h->cur_pic_ptr)) < 0) @@ -1998,8 +1998,8 @@ static int h264_frame_start(H264Context *h) if (CONFIG_ERROR_RESILIENCE) { ff_er_frame_start(&h->er); - h->er.last_pic = - h->er.next_pic = NULL; + memset(&h->er.last_pic, 0, sizeof(h->er.last_pic)); + memset(&h->er.next_pic, 0, sizeof(h->er.next_pic)); } assert(h->linesize && h->uvlinesize); @@ -3049,7 +3049,7 @@ 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->current_slice && !h->sps.new) { - h->er.cur_pic = h->cur_pic_ptr; + ff_mpeg_set_erpic(&h->er.cur_pic, h->cur_pic_ptr); ff_er_frame_end(&h->er); } if (!in_setup && !h->droppable) @@ -4137,8 +4137,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0) (h->ref_list[j][i].reference & 3); } - if (h->ref_count[0]) h->er.last_pic = &h->ref_list[0][0]; - if (h->ref_count[1]) h->er.next_pic = &h->ref_list[1][0]; + if (h->ref_count[0]) ff_mpeg_set_erpic(&h->er.last_pic, &h->ref_list[0][0]); + if (h->ref_count[1]) ff_mpeg_set_erpic(&h->er.next_pic, &h->ref_list[1][0]); + h->er.ref_count = h->ref_count[0]; h0->au_pps_id = pps_id; h->sps.new = |