[Libav-user] Info regarding API clip_interval

anshul anshul.ffmpeg at gmail.com
Sun Feb 2 07:32:03 CET 2014

On 02/02/2014 11:52 AM, anshul wrote:
> Hi guys
> In file libavfilter/drawutils.c there is a function called clip_interval
>  static void clip_interval(int wmax, int *x, int *w, int *dx)
> what does the parameter means over here, means what is x  and what is w
> wmax  is understood to me.
> I came over here, since valgrind showed me that I am using 
> uninitialized memory.
> Thanks
> Anshul


In source code there is reallocation of memory

  935     if ((len = s->expanded_text.len) > s->nb_positions) {
  936         if (!(s->positions =
  937               av_realloc(s->positions, len*sizeof(*s->positions))))
  938             return AVERROR(ENOMEM);
  939         s->nb_positions = len;

and I didn't found any initialization of positions, and we are using 
uninitialized position
in clip filter.

would it be ok to initialize just after allocating the memory.


More information about the Libav-user mailing list