Closed Bug 1202012 Opened 8 years ago Closed 8 years ago

Video decode error where Firefox thinks valid MP4 is corrupt


(Core :: Audio/Video: Playback, defect)

40 Branch
Not set



Tracking Status
firefox40 --- wontfix
firefox41 + wontfix
firefox42 + fixed
firefox43 + fixed
firefox-esr31 --- unaffected
firefox-esr38 --- unaffected


(Reporter: wmcdaniel, Assigned: jya)



(Keywords: regression)


(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150826023504

Steps to reproduce:

Go here:

Video tries to auto-start with the 480P bitrate, which is this file:

Actual results:

In the Concert Vault URL sometimes I see an error about a problem with playback, and others I just see the loading spinner.

The URL explicitly says that the file is corrupt, despite it working in other browsers and players on the same computer as well as other browsers and players on non-windows computers.

From a technician at Kaltura:
"The exact same file plays properly on Chrome (Windows and OSX), IE11, Firefox (OSX), Safari (OSX and iOS).
It also plays correctly on standalone players such as VLC, Windows Media Player, and MPC-HC."

Expected results:

The video should play on the Concert Vault URL just like the other bitrates of the same file.
Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
[Tracking Requested - why for this release]: regression since Firefox40
Version: 35 Branch → 40 Branch
Matthew, can you please help investigate or find an owner? It is unclear to me the extent of this issue and whether it should be blocking 41. 

It is getting too late to fix this in FF41 given that we don't have a patch ready. Let's try to get this fixed in 42.
Flags: needinfo?(kinetik)
Redirecting based on the regression range in comment 3.
Flags: needinfo?(jyavenard)
Flags: needinfo?(kinetik)
Assignee: nobody → jyavenard
Flags: needinfo?(jyavenard)
File plays here in 43 and 42 (OS X) just fine.

If bug 1153049 were to have caused that regression, it would have been on all platforms.
We really only played this file prior bug 1153049 by chance. The default sampling rate in the old constructor was set at 44100Hz and if the sampling rate provided was nonsensical is was ignored. In this MP4 metadata the sampling rate has a value of 1 and the channel count is 3. The WMF audio decoder errors on these values.
This is a file in "QTv2" format ; an Apple extension : we are supposed to ignore the normal values..
Attachment #8659978 - Flags: review?(ajones)
The comment about hton64 not working on big endian caught my eyes. That renders the entire stagefright unusable on big-endian system. So quick fix. This with ffmpeg will allow media playback on big-endian machine.
Attachment #8659980 - Flags: review?(ajones)
Attachment #8659978 - Flags: review?(ajones) → review?(giles)
Attachment #8659980 - Flags: review?(ajones) → review?(giles)
Attachment #8659978 - Flags: review?(giles) → review+
Comment on attachment 8659980 [details] [diff] [review]
P2. Make stagefright works on big-endian systems.

Review of attachment 8659980 [details] [diff] [review]:

What about tests for the new header parsing?

::: media/libstagefright/frameworks/av/media/libstagefright/Utils.cpp
@@ +72,3 @@
>  }
> +// XXX warning: this won't work on big-endian host.

Why not fix both of them while you're here?
Attachment #8659980 - Flags: review?(giles) → review+
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Comment on attachment 8659978 [details] [diff] [review]
Use QTv2 header when available.

Approval Request Comment
[Feature/regressing bug #]: 1153049. While a regression, it used to play thanks to sheer luck
[User impact if declined]: Some content will not play on windows.
[Describe test coverage new/current, TreeHerder]: Local test, in central
[Risks and why]: Low ; this is reading a custom property that we just used to skip over.
[String/UUID change made/needed]: None

could uplift this to beta, but I'm guessing it's too late
Attachment #8659978 - Flags: approval-mozilla-aurora?
Comment on attachment 8659978 [details] [diff] [review]
Use QTv2 header when available.

Indeed too late for beta but still plenty of time for aurora.
Attachment #8659978 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
jya: is this approval-aurora request also for p2 ? (like should part 1 and 2 checked in into aurora ?
Flags: needinfo?(jyavenard)
Flags: needinfo?(jyavenard)
You need to log in before you can comment on or make changes to this bug.