strange(?) behavior of gst_buffer_create_sub() : no caps copied

Jordi Burguet Castell jordi.burguet.castell at gmail.com
Sun Apr 10 18:48:25 PDT 2011


Hi,

When you create a subbuffer with gst_buffer_create_sub(), the newly
created buffer doesn't have its caps set (unless it has offset=0 and
the same duration as the original).

I don't see why the caps wouldn't be copied (gst_caps_ref()-ed). And
if that is the desired behavior, there is no mention to it in the
documentation (though it is mentioned for offset and duration).

By the way, I don't see why offset, duration and even timestamp are
not actually computed for a proper subbuffer, and instead get the
value *_NONE. They can all be given values that make sense for the
subbuffer, don't they?

The function is defined in gstreamer/gst/gstbuffer.c

Thanks,
Jordi


More information about the gstreamer-devel mailing list