memset(&h->mb, 0, sizeof(h->mb));
memset(&h->mb_luma_dc, 0, sizeof(h->mb_luma_dc));
memset(&h->mb_padding, 0, sizeof(h->mb_padding));
+ memset(&h->cur_pic, 0, sizeof(h->cur_pic));
h->avctx = dst;
h->DPB = NULL;
pic->mmco_reset = 0;
pic->recovered = 0;
pic->invalid_gap = 0;
+ pic->sei_recovery_frame_cnt = h->sei_recovery_frame_cnt;
if ((ret = alloc_picture(h, pic)) < 0)
return ret;
h->cur_pic_ptr = pic;
ff_h264_unref_picture(h, &h->cur_pic);
if (CONFIG_ERROR_RESILIENCE) {
- memset(&h->er.cur_pic, 0, sizeof(h->er.cur_pic));
+ ff_h264_set_erpic(&h->er.cur_pic, NULL);
}
if ((ret = ff_h264_ref_picture(h, &h->cur_pic, h->cur_pic_ptr)) < 0)
if (CONFIG_ERROR_RESILIENCE) {
ff_er_frame_start(&h->er);
- memset(&h->er.last_pic, 0, sizeof(h->er.last_pic));
- memset(&h->er.next_pic, 0, sizeof(h->er.next_pic));
+ ff_h264_set_erpic(&h->er.last_pic, NULL);
+ ff_h264_set_erpic(&h->er.next_pic, NULL);
}
assert(h->linesize && h->uvlinesize);
h->block_offset[48 + 32 + i] = (4 * ((scan8[i] - scan8[0]) & 7) << pixel_shift) + 8 * h->uvlinesize * ((scan8[i] - scan8[0]) >> 3);
}
- // s->decode = (h->flags & CODEC_FLAG_PSNR) || !s->encoding ||
- // h->cur_pic.reference /* || h->contains_intra */ || 1;
-
/* We mark the current picture as non-reference after allocating it, so
* that if we break out due to an error it can be released automatically
* in the next ff_MPV_frame_start().
}
if (h->context_initialized &&
- (h->width != h->avctx->coded_width ||
- h->height != h->avctx->coded_height ||
- must_reinit ||
- needs_reinit)) {
+ (must_reinit || needs_reinit)) {
if (h != h0) {
av_log(h->avctx, AV_LOG_ERROR,
"changing width %d -> %d / height %d -> %d on "
return 0;
}
if (h->cabac.bytestream > h->cabac.bytestream_end + 2 )
- av_log(h->avctx, AV_LOG_DEBUG, "bytestream overread %td\n", h->cabac.bytestream_end - h->cabac.bytestream);
+ av_log(h->avctx, AV_LOG_DEBUG, "bytestream overread %"PTRDIFF_SPECIFIER"\n", h->cabac.bytestream_end - h->cabac.bytestream);
if (ret < 0 || h->cabac.bytestream > h->cabac.bytestream_end + 4) {
av_log(h->avctx, AV_LOG_ERROR,
- "error while decoding MB %d %d, bytestream %td\n",
+ "error while decoding MB %d %d, bytestream %"PTRDIFF_SPECIFIER"\n",
h->mb_x, h->mb_y,
h->cabac.bytestream_end - h->cabac.bytestream);
er_add_slice(h, h->resync_mb_x, h->resync_mb_y, h->mb_x,