[x265] [PATCH] api: do not reuse the analysisData buffer for more then one picture, set it NULL

Steve Borho steve at borho.org
Tue Sep 16 14:12:34 CEST 2014


On 09/16, gopu at multicorewareinc.com wrote:
> # HG changeset patch
> # User Gopu Govindaswamy <gopu at multicorewareinc.com>
> # Date 1410868013 -19800
> #      Tue Sep 16 17:16:53 2014 +0530
> # Node ID 23233e9d7fb9ddb13685fe12f23cf8bbed74c0eb
> # Parent  717ea14104cf32bbcafe8e9b8ddef17867807936
> api: do not reuse the analysisData buffer for more then one picture, set it NULL
> 
> diff -r 717ea14104cf -r 23233e9d7fb9 source/encoder/api.cpp
> --- a/source/encoder/api.cpp	Tue Sep 16 16:50:56 2014 +0530
> +++ b/source/encoder/api.cpp	Tue Sep 16 17:16:53 2014 +0530
> @@ -121,6 +121,16 @@
>      do
>      {
>          numEncoded = encoder->encode(pic_in, pic_out);
> +
> +        // do not reuse this same buffer for more then one picture

s/then/than

queued with this fix, plus a note that the encoder now owns the buffers

> +        if (pic_in)
> +        {
> +            if (pic_in->analysisData.intraData)
> +                pic_in->analysisData.intraData = NULL;
> +            if (pic_in->analysisData.interData)
> +                pic_in->analysisData.interData = NULL;
> +        }
> +
>      }
>      while (numEncoded == 0 && !pic_in && encoder->m_numDelayedPic);
>  
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel

-- 
Steve Borho


More information about the x265-devel mailing list