diff mbox series

[FFmpeg-devel,2/3] avcodec/av1dec: Don't rely on AV_PIX_FMT_NONE == -1

Message ID AS8P250MB0744E5F6013D56E40729E40E8FF3A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM
State Accepted
Commit 0058f6013f5286d5e1b7403dfce0d97069cd8f91
Headers show
Series [FFmpeg-devel,1/3] avcodec/av1dec: Pass AVCodecContext* as logctx in get_sw_pixel_format() | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 10, 2023, 12:53 p.m. UTC
Since fb548fba04193a418f118d21b261ba05db4f480b,
this return -1 is in a function returning enum AVPixelFormat
whose caller checks for AV_PIX_FMT_NONE for failure.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/av1dec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 8f6c4f732e..c523c457ec 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -453,7 +453,7 @@  static enum AVPixelFormat get_sw_pixel_format(void *logctx,
     else {
         av_log(logctx, AV_LOG_ERROR,
                "Unknown AV1 profile %d.\n", seq->seq_profile);
-        return -1;
+        return AV_PIX_FMT_NONE;
     }
 
     if (!seq->color_config.mono_chrome) {