Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/pcm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 5ed603ee3f..d769fb1e38 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -338,6 +338,11 @@ static int pcm_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR(EINVAL);
}
+ if (avctx->codec_id != avctx->codec->id) {
+ av_log(avctx, AV_LOG_ERROR, "codec ids mismatch\n");
+ return AVERROR(EINVAL);
+ }
+
n = avctx->channels * sample_size;
if (n && buf_size % n) {