swscale/yuv2rgb: Return a more specific error code from ff_yuv2rgb_c_init_tables()

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2018-12-31 18:14:46 +01:00
parent 07607a1db8
commit fe17f9b956

View File

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