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

Commit 97194cdf authored by Marco Nelissen's avatar Marco Nelissen
Browse files

resolved conflicts for merge of aa0390b7 to master

Change-Id: Ide9dfb5df75cac7c363a3c7fdbd8fabdc326a495
parents 56df9ff3 aa0390b7
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -527,7 +527,8 @@ status_t LiveSession::fetchFile(
        const char *url, sp<ABuffer> *out,
        int64_t range_offset, int64_t range_length,
        uint32_t block_size, /* download block size */
        sp<DataSource> *source /* to return and reuse source */) {
        sp<DataSource> *source, /* to return and reuse source */
        String8 *actualUrl) {
    off64_t size;
    sp<DataSource> temp_source;
    if (source == NULL) {
@@ -623,6 +624,12 @@ status_t LiveSession::fetchFile(
    }

    *out = buffer;
    if (actualUrl != NULL) {
        *actualUrl = (*source)->getUri();
        if (actualUrl->isEmpty()) {
            *actualUrl = url;
        }
    }

    return OK;
}
@@ -634,7 +641,8 @@ sp<M3UParser> LiveSession::fetchPlaylist(
    *unchanged = false;

    sp<ABuffer> buffer;
    status_t err = fetchFile(url, &buffer);
    String8 actualUrl;
    status_t err = fetchFile(url, &buffer, 0, -1, 0, NULL, &actualUrl);

    if (err != OK) {
        return NULL;
@@ -665,7 +673,7 @@ sp<M3UParser> LiveSession::fetchPlaylist(
#endif

    sp<M3UParser> playlist =
        new M3UParser(url, buffer->data(), buffer->size());
        new M3UParser(actualUrl.string(), buffer->data(), buffer->size());

    if (playlist->initCheck() != OK) {
        ALOGE("failed to parse .m3u8 playlist");
+2 −1
Original line number Diff line number Diff line
@@ -164,7 +164,8 @@ private:
            /* download block size */
            uint32_t block_size = 0,
            /* reuse DataSource if doing partial fetch */
            sp<DataSource> *source = NULL);
            sp<DataSource> *source = NULL,
            String8 *actualUrl = NULL);

    sp<M3UParser> fetchPlaylist(
            const char *url, uint8_t *curPlaylistHash, bool *unchanged);