On Thu, Jun 14, 2018 at 9:44 PM Nicolas George <geo...@nsup.org> wrote:
>
> Jun Zhao (2018-06-13):
> > need to call av_bprint_finalize to free the memory source to match
> > av_bprint_init.
>
> As you may have seen, in this case too, the buffer is never allocated
> dynamically.
>
> The av_bprint_finalize() already present is thus useless (I think the
>  )mistake is mine), but not harmful either.
>
Yes, sometimes we didn't need to call av_bprint_finalize() because
bprint just uses a fixed buffer (1024 - size of  internal filed), but
as my opinion, is it needed to recommend the caller call
av_bprint_finalize() to prevent a potential memory leak if bprint
using dynamically buffer and in fixed buffer case, call
av_bprint_finalize() is not  harmful too?  Just a recommendation.
>
> --
>   Nicolas George
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to