mpdparser: Return correct mediaURL value
authorRafał Dzięgiel <rafostar.github@gmail.com>
Thu, 14 Oct 2021 08:18:40 +0000 (10:18 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Mon, 14 Nov 2022 23:45:53 +0000 (23:45 +0000)
This fixes a problem where get_mediaURL was returning NULL when segmentURL
was unavailable instead of baseURL as a fallback.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1147>

subprojects/gst-plugins-bad/ext/dash/gstmpdparser.c
subprojects/gst-plugins-good/ext/adaptivedemux2/dash/gstmpdparser.c

index f88bb6c..54ef72e 100644 (file)
@@ -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 */
index 8e7ed18..7178411 100644 (file)
@@ -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 */