Merge commit 'a9d50bb578ec04c085a25f1e023f75e0e4499d5e'
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 20 Sep 2013 13:37:55 +0000 (15:37 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 20 Sep 2013 13:37:55 +0000 (15:37 +0200)
* commit 'a9d50bb578ec04c085a25f1e023f75e0e4499d5e':
  dcadec: Validate the lfe parameter

Conflicts:
libavcodec/dcadec.c

See: 3b2cd83a829e01a603b52fdc058a054b7899d06e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/dcadec.c

@@@ -735,10 -580,9 +735,10 @@@ static int dca_parse_frame_header(DCACo
      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 */