[Bug 794744] Data is none in buffer from GstVideo.VideoFrame
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Mar 27 23:55:29 UTC 2018
https://bugzilla.gnome.org/show_bug.cgi?id=794744
Mathieu Duponchelle <mduponchelle1 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mduponchelle1 at gmail.com
--- Comment #1 from Mathieu Duponchelle <mduponchelle1 at gmail.com> ---
Investigated, this is unfortunately a gobject-introspection bug:
pygobject obtains the value of the field with g_field_info_get_field(), which
in turn uses the offset returned by g_field_info_get_offset(), which is wrong
(differs from G_STRUCT_OFFSET (GstVideoFrame, buffer).
Digging a bit deeper, the VideoFrame is defined as:
struct _GstVideoFrame {
GstVideoInfo info;
GstVideoFrameFlags flags;
GstBuffer *buffer;
}
and GstVideoInfo ends with a union:
struct _GstVideoInfo {
...
union {
struct {
GstVideoMultiviewMode multiview_mode;
GstVideoMultiviewFlags multiview_flags;
GstVideoFieldOrder field_order;
} abi;
/*< private >*/
gpointer _gst_reserved[GST_PADDING];
} ABI;
}
The union isn't taken into account by the return of get_offset, this is easy to
determine as g_field_info_get_offset(buffer_field_info) == G_STRUCT_OFFSET
(GstVideoInfo, ABI).
The implementation of the get_offset function ends with:
blob = (FieldBlob *)&rinfo->typelib->data[rinfo->offset];
return blob->struct_offset;
I haven't investigated past this point, I would suggest reporting this issue to
the gobject-introspection devs, ideally with a smaller test case, though the
problem here is pretty clear cut.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list