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

Commit a58cc5a0 authored by Steve Kondik's avatar Steve Kondik Committed by Gerrit Code Review
Browse files

Merge "StagefrightMediaScanner: Call endFile() for MIDI and OGG files." into froyo

parents fcea37fc 3d0965ba
Loading
Loading
Loading
Loading
+14 −4
Original line number Diff line number Diff line
@@ -236,6 +236,7 @@ status_t StagefrightMediaScanner::processFile(
        return UNKNOWN_ERROR;
    }

    status_t status;
    if (!strcasecmp(extension, ".mid")
            || !strcasecmp(extension, ".smf")
            || !strcasecmp(extension, ".imy")
@@ -244,15 +245,24 @@ status_t StagefrightMediaScanner::processFile(
            || !strcasecmp(extension, ".rtttl")
            || !strcasecmp(extension, ".rtx")
            || !strcasecmp(extension, ".ota")) {
        return HandleMIDI(path, &client);
        status = HandleMIDI(path, &client);
        if (status != OK)
            return status;
        goto endfile;
    }

    if (!strcasecmp(extension, ".ogg")) {
        return HandleOGG(path, &client);
        status = HandleOGG(path, &client);
        if (status != OK)
            return status;
        goto endfile;
    }

    if (!strcasecmp(extension, ".flac")) {
        return HandleFLAC(path, &client);
        status = HandleFLAC(path, &client);
        if (status != OK)
            return status;
        goto endfile;
    }

    if (mRetriever->setDataSource(path) == OK
@@ -290,7 +300,7 @@ status_t StagefrightMediaScanner::processFile(
            }
        }
    }

 endfile:
    client.endFile();

    return OK;