"Ronald S. Bultje" <[email protected]> writes: > From: "Ronald S. Bultje" <[email protected]> > > --- > libavcodec/snow.c | 4 ++++ > libavcodec/snow.h | 3 ++- > libavcodec/snowenc.c | 2 +- > 3 files changed, 7 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/snow.c b/libavcodec/snow.c > index edd7d07..870bbef 100644 > --- a/libavcodec/snow.c > +++ b/libavcodec/snow.c > @@ -386,6 +386,7 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ > SnowContext *s = avctx->priv_data; > int width, height; > int i, j; > + int emu_buf_size; > > s->avctx= avctx; > s->max_ref_frames=1; //just make sure its not an invalid value in case > of no initial keyframe > @@ -449,6 +450,8 @@ av_cold int ff_snow_common_init(AVCodecContext *avctx){ > > s->avctx->get_buffer(s->avctx, &s->mconly_picture); > s->scratchbuf = av_malloc(s->mconly_picture.linesize[0]*7*MB_SIZE); > + emu_buf_size = s->mconly_picture.linesize[0] * (2 * MB_SIZE + HTAPS_MAX > - 1); > + s->emu_edge_buffer = av_malloc(emu_buf_size);
Unchecked malloc. The rest seems OK. -- Måns Rullgård [email protected] _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
