h264: Clear ERContext.cur_pic when unref'ing current picture.

Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
This commit is contained in:
Dale Curtis 2014-01-02 14:29:38 -08:00 committed by Michael Niedermayer
parent 2e59ffbb79
commit 4feca2214a
1 changed files with 4 additions and 0 deletions

View File

@ -1972,6 +1972,10 @@ 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;
}
if ((ret = ref_picture(h, &h->cur_pic, h->cur_pic_ptr)) < 0)
return ret;