summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Santos <thiagoss@osg.samsung.com>2015-02-15 12:45:49 -0300
committerThiago Santos <thiagoss@osg.samsung.com>2016-04-11 23:13:20 -0300
commit26297de0f6332131f5d4c814d24d1aee2227be2c (patch)
tree7e15fa918acb1d9a4f4cad215f48ce4301cebafb
parentce32475248b7f73b9e0d3169ed06f6fff2fb9bd7 (diff)
baseadaptivesink: only close current fragment if it has data
Otherwise it will attempt to create an empty fragment which will lead to issues when trying to identify the stream
-rw-r--r--gst-libs/gst/baseadaptive/gstbaseadaptivesink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst-libs/gst/baseadaptive/gstbaseadaptivesink.c b/gst-libs/gst/baseadaptive/gstbaseadaptivesink.c
index 3d6135737..1a322aa93 100644
--- a/gst-libs/gst/baseadaptive/gstbaseadaptivesink.c
+++ b/gst-libs/gst/baseadaptive/gstbaseadaptivesink.c
@@ -888,7 +888,8 @@ gst_base_adaptive_sink_chain (GstPad * pad, GstObject * element,
index = pad_data->new_fragment_index;
offset = 0;
- if (pad_data->fragment != NULL) {
+ if (pad_data->fragment != NULL
+ && gst_buffer_get_size (pad_data->fragment) > 0) {
/* Parse headers for this stream and add it to the media manager */
if (G_UNLIKELY (!pad_data->parsed)) {
if (!gst_base_adaptive_process_new_stream (sink, pad, pad_data)) {