Hi, On Tue, Oct 4, 2011 at 8:57 PM, Anton Khirnov <[email protected]> wrote: > From: Michael Niedermayer <[email protected]> > > This allows concurrent decoding of the last field/frame, rather than > only the last slice, of data packets with multiple NAL units packed > together. > > This will fix the slowdown reported in e.g. bug 55. > > Signed-off-by: Anton Khirnov <[email protected]> > --- > libavcodec/h264.c | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/libavcodec/h264.c b/libavcodec/h264.c > index e5d0ed8..2e060da 100644 > --- a/libavcodec/h264.c > +++ b/libavcodec/h264.c > @@ -3629,9 +3629,13 @@ static int decode_nal_units(H264Context *h, const > uint8_t *buf, int buf_size){ > switch (hx->nal_unit_type) { > case NAL_SPS: > case NAL_PPS: > + nals_needed = nal_index; > + break; > case NAL_IDR_SLICE: > case NAL_SLICE: > - nals_needed = nal_index; > + init_get_bits(&hx->s.gb, ptr, bit_length); > + if (!get_ue_golomb(&hx->s.gb)) > + nals_needed = nal_index; > } > continue; > }
LGTM. Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
