[FFmpeg-cvslog] r19328 - trunk/libavcodec/h264.c
astrange
subversion
Fri Jul 3 07:52:01 CEST 2009
Author: astrange
Date: Fri Jul 3 07:52:00 2009
New Revision: 19328
Log:
H.264: Don't set data_partitioning for invalid NAL_DPA.
Before, the decoder could interpret a corrupt frame
as a NAL_DPA and NAL_DPC, and then start decoding
even if decode_slice_header() returned an error.
This frequently caused crashes.
Fixes issue1228, issue1229, and partially issue1238.
Modified:
trunk/libavcodec/h264.c
Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c Thu Jul 2 15:13:20 2009 (r19327)
+++ trunk/libavcodec/h264.c Fri Jul 3 07:52:00 2009 (r19328)
@@ -7603,9 +7603,12 @@ static int decode_nal_units(H264Context
init_get_bits(&hx->s.gb, ptr, bit_length);
hx->intra_gb_ptr=
hx->inter_gb_ptr= NULL;
+
+ if ((err = decode_slice_header(hx, h)) < 0)
+ break;
+
hx->s.data_partitioning = 1;
- err = decode_slice_header(hx, h);
break;
case NAL_DPB:
init_get_bits(&hx->intra_gb, ptr, bit_length);
More information about the ffmpeg-cvslog
mailing list