After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 795586 - Cut & Paste Error in Initialisation of keep_aspect
Cut & Paste Error in Initialisation of keep_aspect
Status: RESOLVED DUPLICATE of bug 795028
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2018-04-26 18:54 UTC by Marie Maurer
Modified: 2018-04-26 19:33 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Marie Maurer 2018-04-26 18:54:22 UTC
Error is here:
https://github.com/GStreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2videodec.c#L960
and here
https://github.com/GStreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2videoenc.c#L1046
and here
https://github.com/GStreamer/gst-plugins-good/blob/master/sys/v4l2/gstv4l2transform.c#L1083

static void

gst_v4l2_video_dec_subinstance_init (GTypeInstance * instance, gpointer g_class)

{

  GstV4l2VideoDecClass *klass = GST_V4L2_VIDEO_DEC_CLASS (g_class);

  GstV4l2VideoDec *self = GST_V4L2_VIDEO_DEC (instance);

  GstVideoDecoder *decoder = GST_VIDEO_DECODER (instance);

 

  gst_video_decoder_set_packetized (decoder, TRUE);

 

  self->v4l2output = gst_v4l2_object_new (GST_ELEMENT (self),

      GST_OBJECT (GST_VIDEO_DECODER_SINK_PAD (self)),

      V4L2_BUF_TYPE_VIDEO_OUTPUT, klass->default_device,

      gst_v4l2_get_output, gst_v4l2_set_output, NULL);

  self->v4l2output->no_initial_format = TRUE;

  self->v4l2output->keep_aspect = FALSE;

 

  self->v4l2capture = gst_v4l2_object_new (GST_ELEMENT (self),

      GST_OBJECT (GST_VIDEO_DECODER_SRC_PAD (self)),

      V4L2_BUF_TYPE_VIDEO_CAPTURE, klass->default_device,

      gst_v4l2_get_input, gst_v4l2_set_input, NULL);

  self->v4l2capture->no_initial_format = TRUE;

  self->v4l2output->keep_aspect = FALSE;

}

Look at last code line. It accesses v4l2output instead of v4l2capture.
v4l2output makes no sense, because keep_aspect in v4l2output was already initialized in previous section. This section works on v4l2capture.
I think it is a cut & paste error.
Comment 1 Nicolas Dufresne (ndufresne) 2018-04-26 19:33:08 UTC
Thanks for taking the time to report this.
This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 795028 ***