From c87c4c2327374d875d33021e82ef1805b396c41a Mon Sep 17 00:00:00 2001 From: KongQun Yang Date: Tue, 10 Oct 2017 14:51:57 -0700 Subject: [PATCH] [HLS] Fix single segment ULR isn't respecting folder location Fixes #253 Change-Id: I61de1b28807ff8be9a881edd3adaa36612713dd8 --- packager/hls/base/simple_hls_notifier.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packager/hls/base/simple_hls_notifier.cc b/packager/hls/base/simple_hls_notifier.cc index 635d4d17c0..ebc29e13f0 100644 --- a/packager/hls/base/simple_hls_notifier.cc +++ b/packager/hls/base/simple_hls_notifier.cc @@ -283,6 +283,11 @@ bool SimpleHlsNotifier::NotifyNewStream(const MediaInfo& media_info, GenerateSegmentUrl(media_info_copy.init_segment_name(), prefix_, output_dir_, media_playlist->file_name())); } + if (media_info_copy.has_media_file_name()) { + media_info_copy.set_media_file_name( + GenerateSegmentUrl(media_info_copy.media_file_name(), prefix_, + output_dir_, media_playlist->file_name())); + } if (!media_playlist->SetMediaInfo(media_info_copy)) { LOG(ERROR) << "Failed to set media info for playlist " << playlist_name; return false;