]> git.sesse.net Git - ffmpeg/commitdiff
Merge commit '772d150a6e82542c06b0c251e73dd299d98d1027'
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Jun 2014 23:45:59 +0000 (01:45 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 23 Jun 2014 23:46:30 +0000 (01:46 +0200)
* commit '772d150a6e82542c06b0c251e73dd299d98d1027':
  h264: error out from decode_nal_units() when AV_EF_EXPLODE is set

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

index 2348d53120985429d6c6878242d8ba7f9962c3fb..561fcb2622eea0759e4c57d2a4421d548d255293 100644 (file)
@@ -1683,7 +1683,9 @@ again:
                 break;
             case NAL_SEI:
                 init_get_bits(&h->gb, ptr, bit_length);
-                ff_h264_decode_sei(h);
+                ret = ff_h264_decode_sei(h);
+                if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
+                    goto end;
                 break;
             case NAL_SPS:
                 init_get_bits(&h->gb, ptr, bit_length);
@@ -1702,7 +1704,9 @@ again:
                 break;
             case NAL_PPS:
                 init_get_bits(&h->gb, ptr, bit_length);
-                ff_h264_decode_picture_parameter_set(h, bit_length);
+                ret = ff_h264_decode_picture_parameter_set(h, bit_length);
+                if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
+                    goto end;
                 break;
             case NAL_AUD:
             case NAL_END_SEQUENCE:
@@ -1719,7 +1723,9 @@ again:
             }
 
             if (context_count == h->max_contexts) {
-                ff_h264_execute_decode_slices(h, context_count);
+                ret = ff_h264_execute_decode_slices(h, context_count);
+                if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
+                    goto end;
                 context_count = 0;
             }
 
@@ -1739,8 +1745,11 @@ again:
             }
         }
     }
-    if (context_count)
-        ff_h264_execute_decode_slices(h, context_count);
+    if (context_count) {
+        ret = ff_h264_execute_decode_slices(h, context_count);
+        if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
+            goto end;
+    }
 
 end:
     /* clean up */