You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avcodec/pcm: Remove always-false check
All codecs here have a valid sample size at this point.
This check has (presumably) been added for DVD PCM,
but even for them the check was always-true after
381e195b46
(and the DVD
code was later moved out altogether). So just remove
this check and the leftover DVD comment.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@ -334,7 +334,6 @@ static int pcm_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
|
||||
sample_size = av_get_bits_per_sample(avctx->codec_id) / 8;
|
||||
|
||||
/* av_get_bits_per_sample returns 0 for AV_CODEC_ID_PCM_DVD */
|
||||
samples_per_block = 1;
|
||||
if (avctx->codec_id == AV_CODEC_ID_PCM_LXF) {
|
||||
/* we process 40-bit blocks per channel for LXF */
|
||||
@ -342,11 +341,6 @@ static int pcm_decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
sample_size = 5;
|
||||
}
|
||||
|
||||
if (sample_size == 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid sample_size\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
if (channels == 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid number of channels\n");
|
||||
return AVERROR(EINVAL);
|
||||
|
Reference in New Issue
Block a user