]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/amrnbdec.c
aacenc: Write correct length for long identification strings.
[ffmpeg] / libavcodec / amrnbdec.c
index 926014f83c019357a33daf0e6fd6079c7e67ac38..fff0e7248aaebbfb07d678dd82db0a4bc835927c 100644 (file)
@@ -977,6 +977,10 @@ static int amrnb_decode_frame(AVCodecContext *avctx, void *data,
 
         pitch_sharpening(p, subframe, p->cur_frame_mode, &fixed_sparse);
 
+        if (fixed_sparse.pitch_lag == 0) {
+            av_log(avctx, AV_LOG_ERROR, "The file is corrupted, pitch_lag = 0 is not allowed\n");
+            return AVERROR_INVALIDDATA;
+        }
         ff_set_fixed_vector(p->fixed_vector, &fixed_sparse, 1.0,
                             AMR_SUBFRAME_SIZE);