ffmpeg: do not compute duration for "mutable size" streams.
Fixes #14326 without breaking other things.
This commit is contained in:
parent
f2015c2f81
commit
af8f2a39a0
@ -432,7 +432,10 @@ StreamBase::Duration() const
|
|||||||
|
|
||||||
int32 flags;
|
int32 flags;
|
||||||
fSource->GetFlags(&flags);
|
fSource->GetFlags(&flags);
|
||||||
if ((flags & B_MEDIA_STREAMING) != 0)
|
|
||||||
|
// "Mutable Size" (ie http streams) means we can't realistically compute
|
||||||
|
// a duration. So don't let ffmpeg giva (wrong) estimate in this case.
|
||||||
|
if ((flags & B_MEDIA_MUTABLE_SIZE) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if ((int64)fStream->duration != AV_NOPTS_VALUE)
|
if ((int64)fStream->duration != AV_NOPTS_VALUE)
|
||||||
|
Loading…
Reference in New Issue
Block a user