mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 08:18:41 +09:00
Issue #1540 - Stop MP3 demuxer from choking on very small files.
This commit is contained in:
parent
84053aba97
commit
7ae0c88c46
1 changed files with 4 additions and 1 deletions
|
|
@ -396,7 +396,10 @@ MP3TrackDemuxer::Duration(int64_t aNumFrames) const {
|
|||
|
||||
MediaByteRange
|
||||
MP3TrackDemuxer::FindFirstFrame() {
|
||||
static const int MIN_SUCCESSIVE_FRAMES = 4;
|
||||
// This check is meant to avoid invalid frames from broken streams, but
|
||||
// small MP3 files and streams with odd header data can break this. Lowering
|
||||
// the value to 3 seems to help significantly.
|
||||
static const int MIN_SUCCESSIVE_FRAMES = 3;
|
||||
|
||||
MediaByteRange candidateFrame = FindNextFrame();
|
||||
int numSuccFrames = candidateFrame.Length() > 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue