[FFmpeg-devel] [PATCH] vp9: fix crash if segmentation=1, keyframe/intraonly=1 and updatemap=0.

Michael Niedermayer michaelni at gmx.at
Tue Dec 24 12:04:57 CET 2013


On Tue, Dec 24, 2013 at 11:16:45AM +0100, Clément Bœsch wrote:
> On Mon, Dec 23, 2013 at 09:40:13PM -0500, Ronald S. Bultje wrote:
> > The reference map is never used in such cases, but we accidently copied
> > it anyway. This could cause crashes if this map has not yet been
> > allocated. Fixes trac 3188.
> > ---
> >  libavcodec/vp9.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
> > index 88c5bc6..78b8d2c 100644
> > --- a/libavcodec/vp9.c
> > +++ b/libavcodec/vp9.c
> > @@ -264,7 +264,8 @@ static int vp9_alloc_frame(AVCodecContext *ctx, VP9Frame *f)
> >      f->mv = (struct VP9mvrefPair *) (f->extradata->data + sz);
> >  
> >      // retain segmentation map if it doesn't update
> > -    if (s->segmentation.enabled && !s->segmentation.update_map) {
> > +    if (s->segmentation.enabled && !s->segmentation.update_map &&
> > +        !s->keyframe && !s->intraonly) {
> >          memcpy(f->segmentation_map, s->frames[LAST_FRAME].segmentation_map, sz);
> >      }
> >  
> 
> LGTM, thanks

applied

thanks

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20131224/85897231/attachment.asc>


More information about the ffmpeg-devel mailing list