X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Frv10.c;h=1d78c92c469e84871d1f2d8719e5aeb920617237;hb=3ab770001817e0f52114a9876819f07fcd8ed93a;hp=393998403103367285e9ccb56e6676b6867034da;hpb=9791c027336dcf60347881bb5c15e57920c769a4;p=ffmpeg diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 39399840310..1d78c92c469 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -431,6 +431,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) s->avctx= avctx; s->out_format = FMT_H263; s->codec_id= avctx->codec_id; + avctx->flags |= CODEC_FLAG_EMU_EDGE; s->orig_width = s->width = avctx->coded_width; s->orig_height= s->height = avctx->coded_height; @@ -530,6 +531,11 @@ static int rv10_decode_packet(AVCodecContext *avctx, if(MPV_frame_start(s, avctx) < 0) return -1; ff_er_frame_start(s); + } else { + if (s->current_picture_ptr->f.pict_type != s->pict_type) { + av_log(s->avctx, AV_LOG_ERROR, "Slice type mismatch\n"); + return -1; + } } av_dlog(avctx, "qscale=%d\n", s->qscale); @@ -603,7 +609,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, if(ret == SLICE_END) break; } - ff_er_add_slice(s, start_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); + ff_er_add_slice(s, start_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, ER_MB_END); return s->gb.size_in_bits; }