mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-24 16:18:16 +00:00
sample: Set buffer/caps/buffer-lists to NULL correctly when replacing them with NULL
This commit is contained in:
parent
cb51bd6b31
commit
99a534271a
1 changed files with 6 additions and 0 deletions
|
@ -287,6 +287,8 @@ gst_sample_set_buffer_list (GstSample * sample, GstBufferList * buffer_list)
|
|||
sample->buffer_list = gst_buffer_list_ref (buffer_list);
|
||||
gst_mini_object_add_parent (GST_MINI_OBJECT_CAST (sample->buffer_list),
|
||||
GST_MINI_OBJECT_CAST (sample));
|
||||
} else {
|
||||
sample->buffer_list = NULL;
|
||||
}
|
||||
|
||||
if (old) {
|
||||
|
@ -322,6 +324,8 @@ gst_sample_set_buffer (GstSample * sample, GstBuffer * buffer)
|
|||
sample->buffer = gst_buffer_ref (buffer);
|
||||
gst_mini_object_add_parent (GST_MINI_OBJECT_CAST (sample->buffer),
|
||||
GST_MINI_OBJECT_CAST (sample));
|
||||
} else {
|
||||
sample->buffer = NULL;
|
||||
}
|
||||
|
||||
if (old) {
|
||||
|
@ -357,6 +361,8 @@ gst_sample_set_caps (GstSample * sample, GstCaps * caps)
|
|||
sample->caps = gst_caps_ref (caps);
|
||||
gst_mini_object_add_parent (GST_MINI_OBJECT_CAST (sample->caps),
|
||||
GST_MINI_OBJECT_CAST (sample));
|
||||
} else {
|
||||
sample->caps = NULL;
|
||||
}
|
||||
|
||||
if (old) {
|
||||
|
|
Loading…
Reference in a new issue