From 34a7710762384448599e82644ec4eb582de70f8d Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 3 Jun 2022 10:25:34 +0200 Subject: [PATCH] hlsdemux2: Fix debug return statement Due to latest commits res could have been NULL. Part-of: --- subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c index 8ffdccc156..16f4efbf8d 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/hls/m3u8.c @@ -1117,7 +1117,9 @@ gst_hls_media_playlist_sync_to_segment (GstHLSMediaPlaylist * playlist, g_ptr_array_remove_index (playlist->segments, 0); res = NULL; } + } #ifndef GST_DISABLE_GST_DEBUG + if (res) { pdtstring = res->datetime ? g_date_time_format_iso8601 (res->datetime) : NULL; GST_DEBUG ("Returning segment sn:%" G_GINT64_FORMAT " dsn:%" G_GINT64_FORMAT @@ -1126,10 +1128,10 @@ gst_hls_media_playlist_sync_to_segment (GstHLSMediaPlaylist * playlist, GST_STIME_ARGS (res->stream_time), GST_TIME_ARGS (res->duration), pdtstring); g_free (pdtstring); -#endif - } else if (!GST_HLS_MEDIA_PLAYLIST_IS_LIVE (playlist)) { + } else { GST_DEBUG ("Could not find a match"); } +#endif return res; }