diff options
author | Carl Eugen Hoyos | 2013-06-11 01:04:49 +0200 |
---|---|---|
committer | Carl Eugen Hoyos | 2013-06-11 01:14:38 +0200 |
commit | 7800b09ece52490dda4c46fbd8e93f92e8438428 (patch) | |
tree | 10415b14bd26d390b08ba58d074b85e62711740f /libswscale/swscale_unscaled.c | |
parent | 57655c608078cc14476e798a1e31e5eeabf1b278 (diff) |
Check more completely for invalid pix_fmts in planarRgb16ToRgb16Wrapper()
This makes the conversion function more robust.
Diffstat (limited to 'libswscale/swscale_unscaled.c')
-rw-r--r-- | libswscale/swscale_unscaled.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 774c655628..3b07800d02 100644 --- a/libswscale/swscale_unscaled.c +++ b/libswscale/swscale_unscaled.c @@ -495,7 +495,8 @@ static int planarRgb16ToRgb16Wrapper(SwsContext *c, const uint8_t *src[], swap += 2; if ((src_format->flags & (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)) != - (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB)) { + (AV_PIX_FMT_FLAG_PLANAR | AV_PIX_FMT_FLAG_RGB) || + bits_per_sample <= 8) { av_log(c, AV_LOG_ERROR, "unsupported planar RGB conversion %s -> %s\n", src_format->name, dst_format->name); return srcSliceH; |