diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index a23293dca2..5d8dcb8ff0 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -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);