---
libavcodec/ac3dec.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index 1f2949dcfd..0b120e6140 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1716,6 +1716,11 @@ skip:
avctx->bit_rate = s->bit_rate + s->prev_bit_rate;
}
+ if (!avctx->sample_rate) {
+ av_log(avctx, AV_LOG_ERROR, "Could not determine the sample rate\n");
+ return AVERROR_INVALIDDATA;
+ }
+
for (ch = 0; ch < EAC3_MAX_CHANNELS; ch++)
extended_channel_map[ch] = ch;
--
2.35.1
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".