Merge commit 'e90a6846c2c006fbebd00e1f2789f4a86fafacef'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Sep 2013 10:44:02 +0000 (12:44 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 16 Sep 2013 11:04:00 +0000 (13:04 +0200)
* commit 'e90a6846c2c006fbebd00e1f2789f4a86fafacef':
  cavsdec: Make sure a sequence header has been decoded before decoding pictures

See: ec0965be36b55624a03d20c3b24e6a7aa61d6cd2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/cavsdec.c

@@@ -945,9 -929,13 +945,14 @@@ static inline int check_for_slice(AVSCo
  static int decode_pic(AVSContext *h)
  {
      int skip_count    = -1;
 +    int ret;
      enum cavs_mb mb_type;
  
+     if (!h->top_qp) {
+         av_log(h->avctx, AV_LOG_ERROR, "No sequence header decoded yet\n");
+         return AVERROR_INVALIDDATA;
+     }
      av_frame_unref(h->cur.f);
  
      skip_bits(&h->gb, 16);//bbv_dwlay