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

Commit daac81d1 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

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

parents 1542af35 b1d49ded
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;