hlsdemux: update segment with valid pos info
authorEunhye Choi <eunhae1.choi@samsung.com>
Fri, 17 Dec 2021 05:48:35 +0000 (14:48 +0900)
committerEunhye Choi <eunhae1.choi@samsung.com>
Fri, 17 Dec 2021 05:48:38 +0000 (14:48 +0900)
- add checking stream type to update segment position
- vtt stream is not proper to construct segment

Change-Id: Ibbdd91c6d75573afd708dc210dac20286290c3be

ext/hls/gsthlsdemux.c
packaging/gst-plugins-bad.spec

index c09b5e6..cfbb68a 100644 (file)
@@ -479,7 +479,13 @@ gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
         &current_pos);
 
     /* FIXME: use minimum position always ? */
+#ifdef TIZEN_FEATURE_HLSDEMUX_UPDATE_SEGMENT
+    if ((final_pos > current_pos) &&
+        (GST_HLS_DEMUX_STREAM_CAST (stream)->stream_type !=
+            GST_HLS_TSREADER_NONE))
+#else
     if (final_pos > current_pos)
+#endif
       final_pos = current_pos;
   }
 
@@ -513,7 +519,7 @@ gst_hls_demux_stream_seek (GstAdaptiveDemuxStream * stream, gboolean forward,
   /* Snap to segment boundary. Improves seek performance on slow machines. */
   snap_nearest =
       (flags & GST_SEEK_FLAG_SNAP_NEAREST) == GST_SEEK_FLAG_SNAP_NEAREST;
-  snap_after = !!(flags & GST_SEEK_FLAG_SNAP_AFTER);
+  snap_after = ! !(flags & GST_SEEK_FLAG_SNAP_AFTER);
 
   GST_M3U8_CLIENT_LOCK (hlsdemux->client);
   /* FIXME: Here we need proper discont handling */
index 81b6aee..55187f6 100644 (file)
@@ -4,7 +4,7 @@
 
 Name:           gst-plugins-bad
 Version:        1.16.2
-Release:        27
+Release:        28
 Summary:        GStreamer Streaming-Media Framework Plug-Ins
 License:        LGPL-2.0+
 Group:          Multimedia/Framework
@@ -82,6 +82,7 @@ export CFLAGS+=" -Wall -g -fPIC\
   -DTIZEN_FEATURE_ADAPTIVE_MODIFICATION\
   -DTIZEN_FEATURE_HLSDEMUX_PROPERTY\
   -DTIZEN_FEATURE_HLSDEMUX_EMPTY_VTT\
+  -DTIZEN_FEATURE_HLSDEMUX_UPDATE_SEGMENT\
   -DTIZEN_FEATURE_TSDEMUX_MODIFICATION\
   -DTIZEN_FEATURE_TSDEMUX_INVALID_PCR_PID\
   -DTIZEN_FEATURE_TSDEMUX_LANG_TAG\