Fix sent GIFs playback.
This commit is contained in:
parent
4794a0be84
commit
8fb2772093
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue