mirror of https://github.com/procxx/kepka.git
Fix possible crash in corrupt media files.
This commit is contained in:
parent
3013301a91
commit
fa3bf11a7f
|
@ -149,7 +149,7 @@ Stream File::Context::initStream(
|
|||
result.duration = (info->duration != AV_NOPTS_VALUE)
|
||||
? PtsToTime(info->duration, result.timeBase)
|
||||
: PtsToTime(format->duration, kUniversalTimeBase);
|
||||
if (!result.duration) {
|
||||
if (result.duration <= 0) {
|
||||
result.codec = nullptr;
|
||||
} else if (result.duration == kTimeUnknown) {
|
||||
result.duration = kDurationUnavailable;
|
||||
|
|
Loading…
Reference in New Issue