swscale/yuv2rgb: Return a more specific error code from ff_yuv2rgb_c_init_tables()
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 31 Dec 2018 17:14:46 +0000 (18:14 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 1 Jan 2019 20:11:47 +0000 (21:11 +0100)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libswscale/yuv2rgb.c

index 737cbb0..d0df061 100644 (file)
@@ -993,7 +993,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4],
     default:
         if(!isPlanar(c->dstFormat) || bpp <= 24)
             av_log(c, AV_LOG_ERROR, "%ibpp not supported by yuv2rgb\n", bpp);
-        return -1;
+        return AVERROR(EINVAL);
     }
     return 0;
 }