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

Commit b1d49ded authored by Andreas Huber's avatar Andreas Huber
Browse files

Fix thumbnail extraction for extractors that don't have a preference.

Change-Id: Id305a44416b08a667aae86c2109aa4dff9f17342
parent f69583cd
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -144,7 +144,10 @@ static VideoFrame *extractVideoFrameWithCodecFlags(
            static_cast<MediaSource::ReadOptions::SeekMode>(seekMode);

    int64_t thumbNailTime;
    if (frameTimeUs < 0 && trackMeta->findInt64(kKeyThumbnailTime, &thumbNailTime)) {
    if (frameTimeUs < 0) {
        if (!trackMeta->findInt64(kKeyThumbnailTime, &thumbNailTime)) {
            thumbNailTime = 0;
        }
        options.setSeekTo(thumbNailTime, mode);
    } else {
        thumbNailTime = -1;