summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-05 11:58:44 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-04-08 15:00:02 +0200
commit17414abb69b44675fd9964069f948a4d48b1ec5e (patch)
tree0b3d4dbecc70fe4423e3bcb910c12b5a2c15e3ca
parent7f0efe232475d7a704924a3cb308281973e8add3 (diff)
avcodec/mpegvideo_dec, h264_slice: Return proper error codes
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
-rw-r--r--libavcodec/h264_slice.c2
-rw-r--r--libavcodec/mpegvideo_dec.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 4b01c54147..a346839902 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.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);
diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c
index d337a6565b..4353f1fd68 100644
--- a/libavcodec/mpegvideo_dec.c
+++ b/libavcodec/mpegvideo_dec.c
@@ -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 */