Closed
Bug 1020679
Opened 10 years ago
Closed 10 years ago
MP4Sample::duration should not always be 0
Categories
(Core :: Audio/Video, defect)
Core
Audio/Video
Tracking
()
RESOLVED
FIXED
mozilla33
People
(Reporter: cpearce, Assigned: ajones)
References
Details
Attachments
(3 files, 3 obsolete files)
10.93 KB,
patch
|
cpearce
:
review+
|
Details | Diff | Splinter Review |
7.24 KB,
patch
|
Details | Diff | Splinter Review | |
19.48 KB,
patch
|
Details | Diff | Splinter Review |
MP4Sample::duration is always 0, it should not be. This causes the BlankDecoderModule to not play audio, as it relies on the duration being correct. It should play an a4 tone.
Reporter | ||
Updated•10 years ago
|
Summary: MP4Sample::duration not not always be 0 → MP4Sample::duration should not always be 0
Assignee | ||
Comment 1•10 years ago
|
||
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → ajones
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•10 years ago
|
||
Does it break anything other than the blank decoder?
Reporter | ||
Comment 3•10 years ago
|
||
Anything that calls MediaData::GetEndTime() is liable to break. We do that a bit: http://mxr.mozilla.org/mozilla-central/search?string=GetEndTime%28%29&find=&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central
Assignee | ||
Comment 4•10 years ago
|
||
Comment on attachment 8435521 [details] [diff] [review] Fix MP4 demuxer duration Review of attachment 8435521 [details] [diff] [review]: ----------------------------------------------------------------- ::: media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp @@ +2773,5 @@ > + mTrackFragmentHeaderInfo.mSampleDescriptionIndex = 0; > + mTrackFragmentHeaderInfo.mDefaultSampleDuration = 0; > + mTrackFragmentHeaderInfo.mDefaultSampleSize = 0; > + mTrackFragmentHeaderInfo.mDefaultSampleFlags = 0; > + mTrackFragmentHeaderInfo.mDataOffset = 0; This just fixes an unrelated issue with uninitialised data.
Assignee | ||
Updated•10 years ago
|
Attachment #8435521 -
Flags: review?(cpearce)
Reporter | ||
Updated•10 years ago
|
Attachment #8435521 -
Flags: review?(cpearce) → review+
Reporter | ||
Comment 5•10 years ago
|
||
Comment on attachment 8435521 [details] [diff] [review] Fix MP4 demuxer duration Review of attachment 8435521 [details] [diff] [review]: ----------------------------------------------------------------- ::: media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp @@ +3173,5 @@ > mBuffer->meta_data()->setInt64(kKey64BitFileOffset, offset); > mBuffer->meta_data()->setInt64( > kKeyTime, ((int64_t)cts * 1000000) / mTimescale); > + mBuffer->meta_data()->setInt64( > + kKeyDuration, ((int64_t)duration * 1000000) / mTimescale); Can mTimescale ever be 0? Please figure out whether it can be 0, and if so prevent it being 0 (in another bug/patch).
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8438915 -
Flags: review?(cpearce)
Reporter | ||
Comment 7•10 years ago
|
||
Comment on attachment 8438915 [details] [diff] [review] Guard against MP4 /0 for timescale Review of attachment 8438915 [details] [diff] [review]: ----------------------------------------------------------------- Please also check for or otherwise prevent divisions by Track->timescale and MPEG4Extractor::mHeaderTimescale in MPEG4Extractor.cpp.
Attachment #8438915 -
Flags: review?(cpearce) → review-
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8438952 -
Flags: review?(cpearce)
Assignee | ||
Updated•10 years ago
|
Attachment #8438915 -
Attachment is obsolete: true
Assignee | ||
Comment 9•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=7da4d31348b4
Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8438961 -
Flags: review?(cpearce)
Reporter | ||
Comment 11•10 years ago
|
||
Comment on attachment 8438952 [details] [diff] [review] Guard against MP4 /0 for timescale Review of attachment 8438952 [details] [diff] [review]: ----------------------------------------------------------------- r+ with the fix mentioned. ::: media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp @@ +448,5 @@ > if (track->sampleTable->findThumbnailSample(&sampleIndex) == OK > && track->sampleTable->getMetaDataForSample( > sampleIndex, NULL /* offset */, NULL /* size */, > &sampleTime) == OK) { > + if (!track->timescale) { The callsite of this also needs(MP4Demuxer::Init()) to null check the return value of this function before dereferencing it.
Attachment #8438952 -
Flags: review?(cpearce) → review+
Reporter | ||
Updated•10 years ago
|
Attachment #8438961 -
Flags: review?(cpearce) → review+
Assignee | ||
Comment 12•10 years ago
|
||
(In reply to Chris Pearce (:cpearce) from comment #11) > The callsite of this also needs(MP4Demuxer::Init()) to null check the return > value of this function before dereferencing it. Are you talking about: if (!metaData.get() || !metaData->findCString(kKeyMIMEType, &mimeType)) { continue; } metaData.get() calls the sp::get() function. The Mozilla conventional `!metaData` doesn't compile so perhaps it be better written as: if (metaData == nullptr || !metaData->findCString(kKeyMIMEType, &mimeType)) { continue; } This compiles and is a little clearer.
Reporter | ||
Comment 13•10 years ago
|
||
That's fine.
Assignee | ||
Comment 14•10 years ago
|
||
Carrying r+
Assignee | ||
Updated•10 years ago
|
Attachment #8438952 -
Attachment is obsolete: true
Assignee | ||
Comment 15•10 years ago
|
||
Removed b2g from crashtest based on try results; carrying r+
Assignee | ||
Updated•10 years ago
|
Attachment #8438961 -
Attachment is obsolete: true
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 16•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/44f45a1e37bc https://hg.mozilla.org/integration/mozilla-inbound/rev/1f0520a29947 https://hg.mozilla.org/integration/mozilla-inbound/rev/7513a64f6c1b
Flags: in-testsuite+
Keywords: checkin-needed
Comment 17•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/44f45a1e37bc https://hg.mozilla.org/mozilla-central/rev/1f0520a29947 https://hg.mozilla.org/mozilla-central/rev/7513a64f6c1b
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in
before you can comment on or make changes to this bug.
Description
•