Merge commit 'a9d50bb578ec04c085a25f1e023f75e0e4499d5e'

* commit 'a9d50bb578ec04c085a25f1e023f75e0e4499d5e':
  dcadec: Validate the lfe parameter

Conflicts:
	libavcodec/dcadec.c

See: 3b2cd83a82
Merged-by: Michael Niedermayer <michaelni@gmx.at>
pull/36/head
Michael Niedermayer 11 years ago
commit 8c320b3c08
  1. 6
      libavcodec/dcadec.c

@ -735,10 +735,10 @@ static int dca_parse_frame_header(DCAContext *s)
s->lfe = get_bits(&s->gb, 2);
s->predictor_history = get_bits(&s->gb, 1);
if (s->lfe == 3) {
if (s->lfe > 2) {
s->lfe = 0;
avpriv_request_sample(s->avctx, "LFE = 3");
return AVERROR_PATCHWELCOME;
av_log(s->avctx, AV_LOG_ERROR, "Invalid LFE value: %d\n", s->lfe);
return AVERROR_INVALIDDATA;
}
/* TODO: check CRC */

Loading…
Cancel
Save