[FFmpeg-devel] [PATCH 2/2] avformat/swfdec: Use side data to communicate w/h changes to the decoder

Michael Niedermayer michaelni at gmx.at
Tue Sep 2 13:37:35 CEST 2014


On Tue, Sep 02, 2014 at 08:39:00AM +0000, Paul B Mahol wrote:
> On 9/2/14, Michael Niedermayer <michaelni at gmx.at> wrote:
> > Fixes reading from freed data
> > Fixes part of Ticket3539
> >
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavformat/swfdec.c |    8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> >
> > diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
> > index 0f78b17..ca2a1c4 100644
> > --- a/libavformat/swfdec.c
> > +++ b/libavformat/swfdec.c
> > @@ -353,11 +353,15 @@ static int swf_read_packet(AVFormatContext *s,
> > AVPacket *pkt)
> >                  avpriv_set_pts_info(vst, 64, 256, swf->frame_rate);
> >                  st = vst;
> >              }
> > -            st->codec->width  = width;
> > -            st->codec->height = height;
> >
> >              if ((res = av_new_packet(pkt, out_len - colormapsize *
> > colormapbpp)) < 0)
> >                  goto bitmap_end;
> > +            if (!st->codec->width && !st->codec->height) {
> > +                st->codec->width  = width;
> > +                st->codec->height = height;
> > +            } else {
> > +                ff_add_param_change(pkt, 0, 0, 0, width, height);
> > +            }
> >              pkt->pos = pos;
> >              pkt->stream_index = st->index;
> >
> > --
> > 1.7.9.5
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> 
> probably ok

applied

thanks

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

No human being will ever know the Truth, for even if they happen to say it
by chance, they would not even known they had done so. -- Xenophanes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140902/9d780634/attachment.asc>


More information about the ffmpeg-devel mailing list