X-Git-Url: http://git.videolan.org/?p=ffmpeg.git;a=blobdiff_plain;f=libavcodec%2Fh264_slice.c;h=c70814f0c31460e63a116e96c36176338b0dee95;hp=17557d15383e5e5c4611b2c1d16e27e97e7f44bd;hb=7ef01a7878149de43aa49e676a343ca67b24c6b2;hpb=8710ee11d75eebc17e7d63bc6ffb91766933bd68 diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 17557d1538..c70814f0c3 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -744,6 +744,7 @@ static int h264_frame_start(H264Context *h) 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; @@ -779,9 +780,6 @@ static int h264_frame_start(H264Context *h) 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(). @@ -1420,10 +1418,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264Context *h0) } 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 " @@ -2408,10 +2403,10 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg) 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,