hlsdemux: Add condition for setting stream discontinuity
authorGilbok Lee <gilbok.lee@samsung.com>
Tue, 16 Nov 2021 01:14:04 +0000 (10:14 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Tue, 16 Nov 2021 04:38:37 +0000 (13:38 +0900)
- Set stream continuity when fragment time changes
- Change in the wrong define in the spec

Change-Id: I592f4cd915c2d186462f771714de797c4b424521

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

index 3e7da32..25e7a07 100644 (file)
@@ -1328,7 +1328,8 @@ gst_hls_demux_handle_buffer (GstAdaptiveDemux * demux,
 #ifdef TIZEN_FEATURE_HLSDEMUX_DISCONT
   if (!stream->discont && GST_CLOCK_TIME_IS_VALID (hls_stream->last_pcr)
       && GST_CLOCK_TIME_IS_VALID (last_pcr)) {
-    if (G_UNLIKELY (ABSDIFF (hls_stream->last_pcr, last_pcr) > 1 * GST_SECOND)) {
+    if (G_UNLIKELY (ABSDIFF (hls_stream->last_pcr, last_pcr) > 1 * GST_SECOND)
+        && (stream->fragment.timestamp != hls_stream->sequence_pos)) {
       GST_DEBUG_OBJECT (stream->pad,
           "Overwriting fragment timestamp [%" GST_TIME_FORMAT "] to [%"
           GST_TIME_FORMAT "]", GST_TIME_ARGS (stream->fragment.timestamp),
index 1e8821c..9a7a4a6 100644 (file)
@@ -82,7 +82,7 @@ export CFLAGS+=" -Wall -g -fPIC\
   -DTIZEN_FEATURE_ADAPTIVE_MODIFICATION\
   -DTIZEN_FEATURE_HLSDEMUX_PROPERTY\
   -DTIZEN_FEATURE_TSDEMUX_MODIFICATION\
-  -DTIZEN_FEATURE_TSDEMUX_WRONG_PCR_PID\
+  -DTIZEN_FEATURE_TSDEMUX_INVALID_PCR_PID\
   -DTIZEN_FEATURE_TSDEMUX_LANG_TAG\
   -DTIZEN_FEATURE_HLS_WEBVTT\
   -DTIZEN_FEATURE_OALSINK_MODIFICATION\