avcodec/mpegvideo_dec, h264_slice: Return proper error codes

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/7.1
Andreas Rheinhardt 7 months ago
parent 7f0efe2324
commit 17414abb69
  1. 2
      libavcodec/h264_slice.c
  2. 2
      libavcodec/mpegvideo_dec.c

@ -483,7 +483,7 @@ static int h264_frame_start(H264Context *h)
if (!ff_thread_can_start_frame(h->avctx)) {
av_log(h->avctx, AV_LOG_ERROR, "Attempt to start a frame outside SETUP state\n");
return -1;
return AVERROR_BUG;
}
release_unused_pictures(h, 1);

@ -328,7 +328,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
if (!ff_thread_can_start_frame(avctx)) {
av_log(avctx, AV_LOG_ERROR, "Attempt to start a frame outside SETUP state\n");
return -1;
return AVERROR_BUG;
}
/* mark & release old frames */

Loading…
Cancel
Save