From b4a84f60a676c74c18e52cd79d65894727386d62 Mon Sep 17 00:00:00 2001 From: Eunhye Choi Date: Fri, 17 Dec 2021 14:48:35 +0900 Subject: [PATCH] hlsdemux: update segment with valid pos info - add checking stream type to update segment position - vtt stream is not proper to construct segment Change-Id: Ibbdd91c6d75573afd708dc210dac20286290c3be --- ext/hls/gsthlsdemux.c | 8 +++++++- packaging/gst-plugins-bad.spec | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ext/hls/gsthlsdemux.c b/ext/hls/gsthlsdemux.c index c09b5e6..cfbb68a 100644 --- a/ext/hls/gsthlsdemux.c +++ b/ext/hls/gsthlsdemux.c @@ -479,7 +479,13 @@ gst_hls_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek) ¤t_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 */ diff --git a/packaging/gst-plugins-bad.spec b/packaging/gst-plugins-bad.spec index 81b6aee..55187f6 100644 --- a/packaging/gst-plugins-bad.spec +++ b/packaging/gst-plugins-bad.spec @@ -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\ -- 2.7.4