sanm: init sizes with the full frame size
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 12 Feb 2013 01:00:04 +0000 (02:00 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 12 Feb 2013 01:00:33 +0000 (02:00 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/sanm.c

index e56a19a..500c01f 100644 (file)
@@ -745,7 +745,8 @@ static int process_frame_obj(SANMVideoContext *ctx)
             return AVERROR_INVALIDDATA;
         avcodec_set_dimensions(ctx->avctx, FFMAX(left + w, ctx->width),
                                            FFMAX(top  + h, ctx->height));
-        init_sizes(ctx, left + w, top + h);
+        init_sizes(ctx, FFMAX(left + w, ctx->width),
+                        FFMAX(top  + h, ctx->height));
         if (init_buffers(ctx)) {
             av_log(ctx->avctx, AV_LOG_ERROR, "error resizing buffers\n");
             return AVERROR(ENOMEM);