Closed Bug 1669503 Opened 4 years ago Closed 8 months ago

Improve mp3 trimming

Categories

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

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: padenot, Assigned: padenot)

References

Details

Attachments

(1 file, 4 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.

Depends on D94469

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: 4 years 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 → ---

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

Attachment #9186244 - Attachment is obsolete: true
Attachment #9179947 - Attachment is obsolete: true
Attachment #9183234 - Attachment is obsolete: true

Fixed by the big patch series in bug 1817997 and others.

Status: REOPENED → RESOLVED
Closed: 4 years ago8 months ago
Flags: needinfo?(padenot)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: