X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fasvenc.c;h=28f7a94071d0927f4bc93cc5aae16b4a27ca1bf9;hb=c40d36076ae695021505e8ca1a59a9be4009997c;hp=3cc94bf91a291276d21ca0005c1687bc8af8bde6;hpb=b2f32d60eeaf883bb7d9e1b8cc2fb9a983d08f72;p=ffmpeg diff --git a/libavcodec/asvenc.c b/libavcodec/asvenc.c index 3cc94bf91a2..28f7a94071d 100644 --- a/libavcodec/asvenc.c +++ b/libavcodec/asvenc.c @@ -228,7 +228,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, clone->format = pict->format; clone->width = FFALIGN(pict->width, 16); clone->height = FFALIGN(pict->height, 16); - ret = av_frame_get_buffer(clone, 32); + ret = av_frame_get_buffer(clone, 0); if (ret < 0) { av_frame_free(&clone); return ret; @@ -295,6 +295,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, while (put_bits_count(&a->pb) & 31) put_bits(&a->pb, 8, 0); + flush_put_bits(&a->pb); size = put_bits_count(&a->pb) / 32; if (avctx->codec_id == AV_CODEC_ID_ASV1) {