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

Brian Michalk michalk at awpi.com
Thu Feb 3 23:34:21 CET 2011


In reading source code, I've found some stuff that doesn't make sense.
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
...
   VSImage dest = videoscale->dest;
   VSImage src = videoscale->src;
// But here, I don't see how videoscale->dest and videoscale->src could
have been initialized.
...
   src.pixels = GST_BUFFER_DATA (in);
   dest.pixels = GST_BUFFER_DATA (out);
// so now, src gets some data populated, but videoscale->src is still
uninitialized
...
     gst_video_scale_prepare_image (videoscale->format, in,
&videoscale->src,
&src_u, &src_v, step, interlaced);
// And here we use videoscale->src, which is apparently unitialized.





More information about the gstreamer-devel mailing list