[gst-devel] Is this a bug in videoscale?

Tim-Philipp Müller t.i.m at zen.co.uk
Fri Feb 4 00:21:03 CET 2011


On Thu, 2011-02-03 at 16:34 -0600, Brian Michalk wrote:

> In reading source code, I've found some stuff that doesn't make sense.

(to you, presumably)

> The following is from gstvideoscale.c, and all comments are mine.  I've
> also removed a few lines of code that don't pertain to my question.
> 
> static GstFlowReturn
> gst_video_scale_transform (GstBaseTransform * trans, GstBuffer * in,
>      GstBuffer * out)
> {
>    GstVideoScale *videoscale = GST_VIDEO_SCALE (trans);
> // So videoscale is a pointer to _GstVideoScale from gstvideoscale.h

Indeed.

>    VSImage dest = videoscale->dest;
>    VSImage src = videoscale->src;
> // But here, I don't see how videoscale->dest and videoscale->src could
> have been initialized.

It was most likely initialised in a different function then, most likely
the *_set_caps() function.

What makes you think these fields are uninitialized? Does valgrind
report them as such? How do you suppose things work at all if they
haven't been initialised beforehand?

You might want to have a look at a more recent version of the code, it
might be easier to make sense of. I think the version you were looking
at is more than half a year old.

 Cheers
  -Tim






More information about the gstreamer-devel mailing list