[FFmpeg-devel] [PATCH]Fail in h264 nal unit decoding if slice header decoding failed
Carl Eugen Hoyos
cehoyos at ag.or.at
Thu Aug 21 13:09:06 CEST 2014
Hi!
Attached patch fixes ticket #3873 here, I don't know if it has any
unexpected side-effects.
Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 389307b..2b299bc 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1585,8 +1585,11 @@ again:
hx->inter_gb_ptr = &hx->gb;
hx->data_partitioning = 0;
- if ((err = ff_h264_decode_slice_header(hx, h)))
+ if ((err = ff_h264_decode_slice_header(hx, h)) < 0) {
+ goto end;
+ } else if (err) {
break;
+ }
if (h->sei_recovery_frame_cnt >= 0) {
if (h->frame_num != h->sei_recovery_frame_cnt || hx->slice_type_nos != AV_PICTURE_TYPE_I)
More information about the ffmpeg-devel
mailing list