Closed Bug 1118632 Opened 10 years ago Closed 10 years ago

MediaCodecReader: duration is wrong after replay.

Categories

(Core :: Audio/Video, defect)

x86_64
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla38

People

(Reporter: bechen, Assigned: bechen)

References

Details

Attachments

(1 file, 1 obsolete file)

STR: 1. Enable MediaCodec preference 2. Open a http streaming by browser 3. At the end of stream, press play button to trigger replay The duration is wrong after replay. It looks like the mp3 Incremental parser is triggered, we should not trigger the parser all the time. == call stack mozilla::MediaDecoderStateMachine::SetDuration (this=this@entry=0xb1a0e800, aDuration=69741178) at /home/benjamin/Documents/hg/mozilla-central/dom/media/MediaDecoderStateMachine.cpp:1358 #1 0xb5aa0454 in mozilla::MediaDecoderStateMachine::UpdateEstimatedDuration (this=0xb1a0e800, aDuration=<optimized out>) at /home/benjamin/Documents/hg/mozilla-central/dom/media/MediaDecoderStateMachine.cpp:1380 #2 0xb5af7746 in mozilla::MediaCodecReader::ParseDataSegment (this=this@entry=0xb1a0e400, aBuffer=aBuffer@entry=0xb1cdd008 "[3\357\340\024ԗ\005\214\215\202\002\023\002\023\232\231Ö\241ʧ3\"L\237Q\225\301\265\210ċ\\\253\341B\325ܪ\310y\026+\317+\276\363\326\004\245F\304\324\366\025\356\257Lۗ\267=\315\370\222{\260\364\266\233M\232\345\320\001ሔ\345\020N\331`\304eJ\031\202\210\022", aLength=aLength@entry=2896, aOffset=aOffset@entry=697589) at /home/benjamin/Documents/hg/mozilla-central/dom/media/omx/MediaCodecReader.cpp:696 #3 0xb5af77e4 in mozilla::MediaCodecReader::NotifyDataArrived (this=0xb1a0e400, aBuffer=0xb1cdd008 "[3\357\340\024ԗ\005\214\215\202\002\023\002\023\232\231Ö\241ʧ3\"L\237Q\225\301\265\210ċ\\\253\341B\325ܪ\310y\026+\317+\276\363\326\004\245F\304\324\366\025\356\257Lۗ\267=\315\370\222{\260\364\266\233M\232\345\320\001ሔ\345\020N\331`\304eJ\031\202\210\022", aLength=<optimized out>, aOffset=697589) at /home/benjamin/Documents/hg/mozilla-central/dom/media/omx/MediaCodecReader.cpp:581 #4 0xb5a8eda8 in mozilla::MediaDecoderStateMachine::NotifyDataArrived (this=0xb1a0e800, aBuffer=<optimized out>, aLength=<optimized out>, aOffset=aOffset@entry=697589) at /home/benjamin/Documents/hg/mozilla-central/dom/media/MediaDecoderStateMachine.cpp:1562 #5 0xb5a8ee84 in mozilla::MediaDecoder::NotifyDataArrived (this=0xb1c330c0, aBuffer=<optimized out>, aLength=<optimized out>, aOffset=697589) at /home/benjamin/Documents/hg/mozilla-central/dom/media/MediaDecoder.cpp:1498
Attached patch bug-1118632.v01.patch (obsolete) (deleted) — Splinter Review
Attachment #8548033 - Flags: review?(cajbir.bugzilla)
Attachment #8548033 - Flags: feedback?(brsun)
Comment on attachment 8548033 [details] [diff] [review] bug-1118632.v01.patch Review of attachment 8548033 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for catching this. Basically it seems good to me. Incrementally parsing definitely should be skipped if we don't need it. Please help also move |mMP3FrameParser = new MP3FrameParser(...)| a little bit lower to make sure |mMP3FrameParser| is allocated only while parsing a so-called MP3 file. ::: dom/media/omx/MediaCodecReader.cpp @@ +689,5 @@ > return NS_ERROR_FAILURE; > } > > + bool isMP3 = mDecoder->GetResource()->GetContentType().EqualsASCII(AUDIO_MP3); > + if (isMP3) { It would be good to have the name of this boolean variable like incrementalParserNeeded or something, so that these two |if| statements can be combined into one intuitively.
Attachment #8548033 - Flags: feedback?(brsun) → feedback+
Attachment #8548033 - Flags: review?(cajbir.bugzilla) → review+
Attached patch bug-1118632.v01.patch (deleted) — Splinter Review
Attachment #8548033 - Attachment is obsolete: true
Attachment #8550242 - Flags: review+
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: