Skip to content

Commit fd7d24f

Browse files
committed
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 <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
1 parent f9218e4 commit fd7d24f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libavcodec/av1dec.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
493493
else if (bit_depth == 12)
494494
pix_fmt = AV_PIX_FMT_YUV444P12;
495495
else
496-
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
496+
av_assert0(0);
497497
} else if (seq->color_config.subsampling_x == 1 &&
498498
seq->color_config.subsampling_y == 0) {
499499
if (bit_depth == 8)
@@ -503,7 +503,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
503503
else if (bit_depth == 12)
504504
pix_fmt = AV_PIX_FMT_YUV422P12;
505505
else
506-
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
506+
av_assert0(0);
507507
} else if (seq->color_config.subsampling_x == 1 &&
508508
seq->color_config.subsampling_y == 1) {
509509
if (bit_depth == 8)
@@ -513,7 +513,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
513513
else if (bit_depth == 12)
514514
pix_fmt = AV_PIX_FMT_YUV420P12;
515515
else
516-
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
516+
av_assert0(0);
517517
}
518518
} else {
519519
if (bit_depth == 8)
@@ -523,7 +523,7 @@ static enum AVPixelFormat get_sw_pixel_format(void *logctx,
523523
else if (bit_depth == 12)
524524
pix_fmt = AV_PIX_FMT_GRAY12;
525525
else
526-
av_log(logctx, AV_LOG_WARNING, "Unknown AV1 pixel format.\n");
526+
av_assert0(0);
527527
}
528528

529529
return pix_fmt;

0 commit comments

Comments
 (0)