aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-11 01:04:49 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-06-11 01:14:38 +0200
commit7800b09ece52490dda4c46fbd8e93f92e8438428 (patch)
tree10415b14bd26d390b08ba58d074b85e62711740f
parent57655c608078cc14476e798a1e31e5eeabf1b278 (diff)
downloadffmpeg-7800b09ece52490dda4c46fbd8e93f92e8438428.tar.gz
Check more completely for invalid pix_fmts in planarRgb16ToRgb16Wrapper()
This makes the conversion function more robust.
-rw-r--r--libswscale/swscale_unscaled.c3
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;