avcodec/av1dec: bit_depth cannot be another values than 8,10,12

Fixes: CID1544265 Logically dead code

Sponsored-by: Sovereign Tech Fund
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fd7d24fa3f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.0
Michael Niedermayer 9 months ago
parent 13ef4f209f
commit c5671e9de9
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 8
      libavcodec/av1dec.c

@ -492,7 +492,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
else if (bit_depth == 12)
pix_fmt = AV_PIX_FMT_YUV444P12;
else
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
av_assert0(0);
} else if (seq->color_config.subsampling_x == 1 &&
seq->color_config.subsampling_y == 0) {
if (bit_depth == 8)
@ -502,7 +502,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
else if (bit_depth == 12)
pix_fmt = AV_PIX_FMT_YUV422P12;
else
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
av_assert0(0);
} else if (seq->color_config.subsampling_x == 1 &&
seq->color_config.subsampling_y == 1) {
if (bit_depth == 8)
@ -512,7 +512,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
else if (bit_depth == 12)
pix_fmt = AV_PIX_FMT_YUV420P12;
else
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
av_assert0(0);
}
} else {
if (bit_depth == 8)
@ -522,7 +522,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
else if (bit_depth == 12)
pix_fmt = AV_PIX_FMT_GRAY12;
else
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
av_assert0(0);
}
return pix_fmt;

Loading…
Cancel
Save