Closed Bug 1077264 Opened 5 years ago Closed 5 years ago

Fragmented MP4 generated by mp4fragment utility do not play

Categories

(Core :: Audio/Video, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jya, Assigned: jya)

References

Details

Attachments

(1 file, 2 obsolete files)

This is related to bug 1076719, but the cause is different.

The mp4fragment utility from the Bento4/AP4 project http://bento4.sourceforge.net/docs/html/index.html generates fragment where each moof only contains a single streamID rather than muxed audio/video ones.

stagefright treats this as End Of Stream as now samples were found in the fragment
Depends on: 1076719
Keep looking for next fragments until samples are found.
Attachment #8499326 - Flags: review?(ajones)
Simplify logic. Remove equivalent code.
Attachment #8499328 - Flags: review?(ajones)
Attachment #8499326 - Attachment is obsolete: true
Attachment #8499326 - Flags: review?(ajones)
Comment on attachment 8499328 [details] [diff] [review]
Keep searching until one correct fragment is found

Review of attachment 8499328 [details] [diff] [review]:
-----------------------------------------------------------------

::: media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
@@ +3575,5 @@
> +            do {
> +                mCurrentMoofOffset = nextMoof;
> +                status_t ret = parseChunk(&nextMoof);
> +                if (ret != OK) {
> +                    return ret;

Note that 'sidx' always returns UNKNOWN_ERROR and 'moov' sometimes does. We won't see a 'moov' here but this code will fail when it sees a 'sidx'.
Attachment #8499328 - Flags: review?(ajones) → review-
(In reply to Anthony Jones (:kentuckyfriedtakahe, :k17e) from comment #4)
> Comment on attachment 8499328 [details] [diff] [review]
> Keep searching until one correct fragment is found
> 
> Review of attachment 8499328 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> :::
> media/libstagefright/frameworks/av/media/libstagefright/MPEG4Extractor.cpp
> @@ +3575,5 @@
> > +            do {
> > +                mCurrentMoofOffset = nextMoof;
> > +                status_t ret = parseChunk(&nextMoof);
> > +                if (ret != OK) {
> > +                    return ret;
> 
> Note that 'sidx' always returns UNKNOWN_ERROR and 'moov' sometimes does. We
> won't see a 'moov' here but this code will fail when it sees a 'sidx'.

Ok. Will handle sidx separately, back to the original patch

if moov is encountered here it should be an error anyway...
treat sidx and styp separately (styp would be handled automatically, but doing that way here slightly reduce the overhead)
Attachment #8499938 - Flags: review?(ajones)
Attachment #8499328 - Attachment is obsolete: true
Attachment #8499938 - Flags: review?(ajones) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/70af7ba3c010
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.