Fix sent GIFs playback.

This commit is contained in:
John Preston 2020-01-17 16:56:05 +03:00
parent 4794a0be84
commit 8fb2772093
1 changed files with 3 additions and 3 deletions

View File

@ -162,10 +162,10 @@ Stream File::Context::initStream(
result.duration = (info->duration != AV_NOPTS_VALUE) result.duration = (info->duration != AV_NOPTS_VALUE)
? FFmpeg::PtsToTime(info->duration, result.timeBase) ? FFmpeg::PtsToTime(info->duration, result.timeBase)
: FFmpeg::PtsToTime(format->duration, FFmpeg::kUniversalTimeBase); : FFmpeg::PtsToTime(format->duration, FFmpeg::kUniversalTimeBase);
if (result.duration <= 0) { if (result.duration == kTimeUnknown) {
result.codec = nullptr;
} else if (result.duration == kTimeUnknown) {
result.duration = kDurationUnavailable; result.duration = kDurationUnavailable;
} else if (result.duration <= 0) {
result.codec = nullptr;
} else { } else {
++result.duration; ++result.duration;
if (result.duration > kDurationMax) { if (result.duration > kDurationMax) {