Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3acb4c0 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role)
Browse files

[automerger] M3UParser: handle missing EXT-X-MEDIA URIs am: b8c3a74d

Change-Id: I3eb6d9c776064ab65b9966afde17887ef7f751b1
parents fa10a782 b8c3a74d
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -233,7 +233,11 @@ bool M3UParser::MediaGroup::getActiveURI(AString *uri, const char *baseURL) cons
        if (mSelectedIndex >= 0 && i == (size_t)mSelectedIndex) {
        if (mSelectedIndex >= 0 && i == (size_t)mSelectedIndex) {
            const Media &item = mMediaItems.itemAt(i);
            const Media &item = mMediaItems.itemAt(i);


            if (item.mURI.empty()) {
                *uri = "";
            } else {
                *uri = item.makeURL(baseURL);
                *uri = item.makeURL(baseURL);
            }
            return true;
            return true;
        }
        }
    }
    }
@@ -464,7 +468,7 @@ bool M3UParser::getTypeURI(size_t index, const char *key, AString *uri) const {
        }
        }


        if ((*uri).empty()) {
        if ((*uri).empty()) {
            *uri = mItems.itemAt(index).mURI;
            *uri = mItems.itemAt(index).makeURL(mBaseURI.c_str());
        }
        }
    }
    }