GNOME Bugzilla – Bug 795586
Cut & Paste Error in Initialisation of keep_aspect
Last modified: 2018-04-26 19:33:08 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.
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 ***