[FFmpeg-devel] [PATCH] avcodec/h264_slice: Update first_slice when updating current_slice for 2nd fields
Michael Niedermayer
michael at niedermayer.cc
Sun Mar 27 05:04:41 CEST 2016
On Sat, Mar 26, 2016 at 05:17:46PM +0000, Kieran Kunhya wrote:
> On Fri, 25 Mar 2016 at 16:33 Michael Niedermayer <michael at niedermayer.cc>
> wrote:
>
> > This fixes Ticket 4389 differently
> > Fixes Ticket5371
> > Fixes null pointer dereference
> >
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> > libavcodec/h264_slice.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
> > index 9a5bc3f..c4340dc 100644
> > --- a/libavcodec/h264_slice.c
> > +++ b/libavcodec/h264_slice.c
> > @@ -1188,6 +1188,7 @@ int ff_h264_decode_slice_header(H264Context *h,
> > H264SliceContext *sl)
> > if (h->cur_pic_ptr && FIELD_PICTURE(h) && h->first_field) {
> > ret = ff_h264_field_end(h, h->slice_ctx, 1);
> > h->current_slice = 0;
> > + first_slice = 1;
> > if (ret < 0)
> > return ret;
> > } else if (h->cur_pic_ptr && !FIELD_PICTURE(h) &&
> > !h->first_field && h->nal_unit_type == NAL_IDR_SLICE) {
> > @@ -1422,7 +1423,7 @@ int ff_h264_decode_slice_header(H264Context *h,
> > H264SliceContext *sl)
> > }
> > }
> >
> > - if (!h->current_slice && h->dequant_coeff_pps != pps_id) {
> > + if (first_slice && h->dequant_coeff_pps != pps_id) {
> > h->dequant_coeff_pps = pps_id;
> > ff_h264_init_dequant_tables(h);
> > }
> > --
> > 1.7.9.5
> >
> >
> Ok if tested but I will fuzz more.
applied a different (safer) solution
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Opposition brings concord. Out of discord comes the fairest harmony.
-- Heraclitus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160327/d710cb7e/attachment.sig>
More information about the ffmpeg-devel
mailing list