mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 17:51:41 -05:00
Fix possible crash in corrupt media files.
This commit is contained in:
parent
3013301a91
commit
fa3bf11a7f
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue