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

Change-Id: Id305a44416b08a667aae86c2109aa4dff9f17342
This commit is contained in:
Andreas Huber
2010-12-08 14:50:10 -08:00
parent f69583cde5
commit b1d49ded62

View File

@@ -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;