[FFmpeg-devel] [PATCH 15/15] avcodec/mpegvideo_dec, h264_slice: Return proper error codes
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Fri Apr 5 15:41:38 EEST 2024
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
libavcodec/h264_slice.c | 2 +-
libavcodec/mpegvideo_dec.c | 2 +-
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 */
--
2.40.1
More information about the ffmpeg-devel
mailing list