]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pcm.c
ff_emulated_edge_mc: fix handling of w/h being 0
[ffmpeg] / libavcodec / pcm.c
index 5ed603ee3f4627f76d4295e00d9e726c5fcf3391..d769fb1e3805673d4bd9059adfeac4df6b72695d 100644 (file)
@@ -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) {