Open atishnazir opened 2 years ago
I debated whether a better fix would be to be to adjust the semantic of FromGstBufferUnsafeNone and FromGstBufferListUnsafeNone to return nil when called with C.NULL but felt the impact would be more far reaching.
@atishnazir please recreate this PR for https://github.com/go-gst/go-gst (where future development of the bindings will take place) if you think it is necessary.
gst_sample_get_buffer{,list} returns NULL if a buffer{,list} has not been set. Previous go-gst behaviour wrapped this NULL pointer in the respective go-gst proxy object.
This causes a problem with AppSink when one needs to disambiguate between whether a GstSample contains a GstBufferList, a GstBuffer or indeed nothing at all. For example: