On Wed, Feb 22, 2012 at 06:29:43PM +0100, Anton Khirnov wrote:
> ---
> libavcodec/ffv1.c | 34 +++++++++++++++++++++++-----------
> 1 files changed, 23 insertions(+), 11 deletions(-)
>
> diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c
> index 366de02..33348bd 100644
> --- a/libavcodec/ffv1.c
> +++ b/libavcodec/ffv1.c
> @@ -1080,17 +1080,25 @@ static int encode_slice(AVCodecContext *c, void *arg){
> return 0;
> }
>
> -static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int
> buf_size, void *data){
> +static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
> + const AVFrame *pict, int *got_packet)
> +{
> FFV1Context *f = avctx->priv_data;
> RangeCoder * const c= &f->slice_context[0]->c;
> - AVFrame *pict = data;
> AVFrame * const p= &f->picture;
> int used_count= 0;
> uint8_t keystate=128;
> uint8_t *buf_p;
> - int i;
> + int i, ret;
> +
> + if (!pkt->data &&
> + (ret = av_new_packet(pkt, avctx->width*avctx->height*((8*2+1+1)*4)
> + + FF_MIN_BUFFER_SIZE)) < 0) {
I think you can decrease that number in eight times, otherwise LGTM
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel