Closed Bug 986947 Opened 11 years ago Closed 11 years ago

mp3 will not play if mp3 is in mp4 container format

Categories

(Core :: Audio/Video, defect)

28 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: zitrobugs, Assigned: cpearce)

References

Details

(Whiteboard: [qa-] )

Attachments

(2 files)

Attached video ff-28-sound.mp4
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 (Beta/Release) Build ID: 20140314220517 Steps to reproduce: Take a fresh Firefox Profile with Firefox 28. If you will play a mp3 in a mp4 container format i get an error from corrupt file. For example http://mozhelp.square7.ch/firefox-28-html5-bug/index.php or direct file http://mozhelp.square7.ch/firefox-28-html5-bug/ff-28-sound.mp4 Bevore Firefox 28 there was no error and video/audio play (for example in Firefox 27.0.1) Actual results: Firefox says: corrupt file Expected results: hear the .mp3 sound of .mp4 file
Blocks: 945947
Blocks: 861693
Blocks: 986926
* Report that we can play MP3 inside MP4 on Windows Vista and later in HTMLMediaElement.canPlayType. Chrome and IE on Windows match this behaviour. * Add a test file with MP3 contained inside MP4. Note the B2G emulator can't play this file, so I added a codecs parameter to the file's mime type so that decoder backends have to opt-in to testing with it. * Enable playback of MP3 inside MP4 in WMFReader. * Change from reporting the IMFSourceReader's duration inside WMFReader, to instead report the IMFSourceReader's duration as the media "end time". This is needed because the MP3-contained-in-MP4 file's first sample output by the IMFSourceReader has a non-zero timestamp, and the MediaDecoderStateMachine assumes that the media samples will be in the range [$firstSampleStartTime, $firstSampleStartTime+$reportedDuration]. But that's not the case here, the IMFSourceReader seems to output samples in the range [0,$reportedDuration]. This assumption mismatch means on the MP3-contained-in-MP4 file we end up trying to seek after what the IMFSourceReader assumes is the end of the file, which fails and causes test failures.
Assignee: nobody → cpearce
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8400215 - Flags: review?(paul)
Attachment #8400215 - Flags: review?(paul) → review+
(In reply to Chris Pearce (:cpearce) from comment #1) > * Change from reporting the IMFSourceReader's duration inside WMFReader, to > instead report the IMFSourceReader's duration as the media "end time". This > is needed because the MP3-contained-in-MP4 file's first sample output by the > IMFSourceReader has a non-zero timestamp, and the MediaDecoderStateMachine > assumes that the media samples will be in the range [$firstSampleStartTime, > $firstSampleStartTime+$reportedDuration]. But that's not the case here, the > IMFSourceReader seems to output samples in the range [0,$reportedDuration]. > This assumption mismatch means on the MP3-contained-in-MP4 file we end up > trying to seek after what the IMFSourceReader assumes is the end of the > file, which fails and causes test failures. Will that affect the value returned by MediaDecoderStateMachine::GetDuration() which is |mEndTime - mStartTime|?
(In reply to JW Wang (PTO ~4/9) [:jwwang] from comment #2) > (In reply to Chris Pearce (:cpearce) from comment #1) > > * Change from reporting the IMFSourceReader's duration inside WMFReader, to > > instead report the IMFSourceReader's duration as the media "end time". This > > is needed because the MP3-contained-in-MP4 file's first sample output by the > > IMFSourceReader has a non-zero timestamp, and the MediaDecoderStateMachine > > assumes that the media samples will be in the range [$firstSampleStartTime, > > $firstSampleStartTime+$reportedDuration]. But that's not the case here, the > > IMFSourceReader seems to output samples in the range [0,$reportedDuration]. > > This assumption mismatch means on the MP3-contained-in-MP4 file we end up > > trying to seek after what the IMFSourceReader assumes is the end of the > > file, which fails and causes test failures. > > Will that affect the value returned by > MediaDecoderStateMachine::GetDuration() which is |mEndTime - mStartTime|? Yes. This will make it return $reportedDuration - $firstSampleStartTime, which is actually how much audio the IMFSourceReader outputs.
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: