From 0d79dbedf3254b02c82f0544827db119b2abe1b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Thu, 14 Oct 2021 10:18:40 +0200 Subject: [PATCH] mpdparser: Return correct mediaURL value This fixes a problem where get_mediaURL was returning NULL when segmentURL was unavailable instead of baseURL as a fallback. Part-of: --- subprojects/gst-plugins-bad/ext/dash/gstmpdparser.c | 2 +- .../gst-plugins-good/ext/adaptivedemux2/dash/gstmpdparser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/dash/gstmpdparser.c b/subprojects/gst-plugins-bad/ext/dash/gstmpdparser.c index f88bb6c807..54ef72e815 100644 --- a/subprojects/gst-plugins-bad/ext/dash/gstmpdparser.c +++ b/subprojects/gst-plugins-bad/ext/dash/gstmpdparser.c @@ -1393,7 +1393,7 @@ gst_mpdparser_get_mediaURL (GstActiveStream * stream, url_prefix = segmentURL->media ? segmentURL->media : stream->baseURL; g_return_val_if_fail (url_prefix != NULL, NULL); - return segmentURL->media; + return url_prefix; } /* navigation functions */ diff --git a/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdparser.c b/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdparser.c index 8e7ed18acb..71784115cb 100644 --- a/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdparser.c +++ b/subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdparser.c @@ -1424,7 +1424,7 @@ gst_mpdparser_get_mediaURL (GstActiveStream * stream, url_prefix = segmentURL->media ? segmentURL->media : stream->baseURL; g_return_val_if_fail (url_prefix != NULL, NULL); - return segmentURL->media; + return url_prefix; } /* navigation functions */