diff options
author | athenian200 <athenian200@outlook.com> | 2020-05-10 06:45:59 -0500 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2020-05-20 13:48:10 +0000 |
commit | fe0963002fb16b7e3e53f75004af0e79348c861c (patch) | |
tree | daea1818e9e51ddf12932b3985db65e52d765a42 /dom | |
parent | aeef4240d598a6e0e8be35c854ad26ff6d77fa3f (diff) | |
download | UXP-fe0963002fb16b7e3e53f75004af0e79348c861c.tar UXP-fe0963002fb16b7e3e53f75004af0e79348c861c.tar.gz UXP-fe0963002fb16b7e3e53f75004af0e79348c861c.tar.lz UXP-fe0963002fb16b7e3e53f75004af0e79348c861c.tar.xz UXP-fe0963002fb16b7e3e53f75004af0e79348c861c.zip |
Issue #1540 - Stop MP3 demuxer from choking on very small files.
Diffstat (limited to 'dom')
-rw-r--r-- | dom/media/mp3/MP3Demuxer.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dom/media/mp3/MP3Demuxer.cpp b/dom/media/mp3/MP3Demuxer.cpp index 5a98cabfe..ccc515afb 100644 --- a/dom/media/mp3/MP3Demuxer.cpp +++ b/dom/media/mp3/MP3Demuxer.cpp @@ -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; |