Merge commit '1147d39bca135df8673031d16989ba486a52172a' into release/1.1
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Apr 2014 12:45:04 +0000 (14:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 21 Apr 2014 13:00:53 +0000 (15:00 +0200)
* commit '1147d39bca135df8673031d16989ba486a52172a':
  h264: reset data_partitioning if decoding the slice header for NAL_DPA fails

Merged-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/h264.c

index 7268c3b..7d86978 100644 (file)
@@ -4199,8 +4199,13 @@ again:
                 hx->intra_gb_ptr =
                 hx->inter_gb_ptr = NULL;
 
-                if ((err = decode_slice_header(hx, h)) < 0)
+                if ((err = decode_slice_header(hx, h)) < 0) {
+                    /* make sure data_partitioning is cleared if it was set
+                     * before, so we don't try decoding a slice without a valid
+                     * slice header later */
+                    h->s.data_partitioning = 0;
                     break;
+                }
 
                 hx->s.data_partitioning = 1;
                 break;