]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/alac.c
avcodec/dnxhd_parser: remove unneeded code
[ffmpeg] / libavcodec / alac.c
index 2f443406615b3fa5f2a5c31ba551768560e6f28d..c234d7153b96d3473d5021e130626eea849d00d2 100644 (file)
@@ -306,7 +306,7 @@ static int decode_element(AVCodecContext *avctx, AVFrame *frame, int ch_index,
             rice_history_mult[ch] = get_bits(&alac->gb, 3);
             lpc_order[ch]         = get_bits(&alac->gb, 5);
 
-            if (lpc_order[ch] >= alac->max_samples_per_frame)
+            if (lpc_order[ch] >= alac->max_samples_per_frame || !lpc_quant[ch])
                 return AVERROR_INVALIDDATA;
 
             /* read the predictor table */