Merge changes from topic "am-3d7d15cb-f02b-474d-adb3-adb7e033539e" into oc-dev
* changes:
[automerger] M3UParser: handle missing EXT-X-MEDIA URIs am: b8c3a74de5 am: a3acb4c0f2 am: b7b790ef84 am: 17ae208764 am: c60f2ff6b4
[automerger] M3UParser: handle missing EXT-X-MEDIA URIs am: b8c3a74de5 am: a3acb4c0f2 am: b7b790ef84 am: 17ae208764
[automerger] M3UParser: handle missing EXT-X-MEDIA URIs am: b8c3a74de5 am: a3acb4c0f2 am: b7b790ef84
[automerger] M3UParser: handle missing EXT-X-MEDIA URIs am: b8c3a74de5 am: a3acb4c0f2
[automerger] M3UParser: handle missing EXT-X-MEDIA URIs am: b8c3a74de5
M3UParser: handle missing EXT-X-MEDIA URIs
diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp
index a0e6c47..6115513 100644
--- a/media/libstagefright/httplive/M3UParser.cpp
+++ b/media/libstagefright/httplive/M3UParser.cpp
@@ -233,7 +233,11 @@
if (mSelectedIndex >= 0 && i == (size_t)mSelectedIndex) {
const Media &item = mMediaItems.itemAt(i);
- *uri = item.makeURL(baseURL);
+ if (item.mURI.empty()) {
+ *uri = "";
+ } else {
+ *uri = item.makeURL(baseURL);
+ }
return true;
}
}
@@ -464,7 +468,7 @@
}
if ((*uri).empty()) {
- *uri = mItems.itemAt(index).mURI;
+ *uri = mItems.itemAt(index).makeURL(mBaseURI.c_str());
}
}