Open Bug 1669503 Opened 9 months ago Updated 7 months ago

Improve mp3 trimming

Categories

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

defect

Tracking

()

REOPENED

People

(Reporter: padenot, Assigned: padenot, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 2 obsolete files)

In bug 1566389, mp3 decoding was made almost correct. It's not correct if the end trimming spans two packets, like it is in this file: https://github.com/juj/audio_test_suite/blob/master/8bit_detective/8bit_detective_8000hz_8kbs_mono_lame3.99.mp3, that has a duration of 28.65675s, but Firefox reports 28.6618820861678s, it's missing 41 frames at the end, after having trimmed the last packet, it should have trimmed the previous one.

Assignee: nobody → padenot
Status: NEW → ASSIGNED
Blocks: 1669166
Severity: -- → S3
OS: Unspecified → All
Priority: -- → P1
Hardware: Unspecified → All
Depends on: 1672311

We can't handle this at the decoder level, because the decoder doesn't know that
a particular packet it's seeing is the second to last packet and it should start
trimming the end of this packet because the encoder padding spans multiple
packet.

Attachment #9183233 - Attachment is obsolete: true
Attachment #9179947 - Attachment description: Bug 1669503 - Handle mp3 encoder padding when the padding duration spans more than one packet. r?jya → Bug 1669503 - Handle mp3 encoder padding when the padding duration spans more than one packet. r?padenot
Attachment #9183234 - Attachment is obsolete: true
Attachment #9183234 - Attachment is obsolete: false

jya, can you r+ the patches here and then we can land? It's your patch and my test, fixed.

Flags: needinfo?(jyavenard)
Flags: needinfo?(jyavenard)
Pushed by padenot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d5cbc458d318
Handle mp3 encoder padding when the padding duration spans more than one packet. r=jya
https://hg.mozilla.org/integration/autoland/rev/863ecb9b15d5
Add various test cases for mp3 trimming. r=jya
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 84 Branch

Backed out for crashing in mozilla::MP3TrackDemuxer::GetNextFrame: https://hg.mozilla.org/mozilla-central/rev/d7d7fd7434a6f8945394e304b21bb23c727bd04b

Status: RESOLVED → REOPENED
Flags: needinfo?(padenot)
Resolution: FIXED → ---
Target Milestone: 84 Branch → ---

For crashes like bp-d2311904-dee6-4e6c-9ea5-8fcd50201106 - [@ mozilla::MP3TrackDemuxer::GetNextFrame]

Backed out changeset 863ecb9b15d5 (bug 1669503)
Backed out changeset d5cbc458d318 (bug 1669503)

Attachment #9186244 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.