Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(81795)

Issue 1529: Improve handling of holes (corrupt pages). (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 months, 2 weeks ago by derf
Modified:
4 months, 1 week ago
Reviewers:
tdaede
Visibility:
Public.

Description

Previously, when we encountered a hole (a gap in the page sequence
 numbers), we would save off all of the packets from the first page
 after the hole, but not timestamp them.
That meant when they were actually decoded, op_pcm_tell() would
 report a timestamp of 0 until reaching the last packet on that
 page.

Instead, handle holes just like a raw seek.
We reset the granule position tracking, and attempt to timestamp
 packets backwards from the end of the page.
If the first page after the hole is an EOS page, we just throw it
 away (rather than risk playing invalid samples due to incorrect
 end-trimming).
We also throw away the first 80 ms of audio after a hole, to allow
 the decoder state to reconverge.

This patch also updates the example to report the hole and
 continue decoding, rather than immediately stopping when a hole is
 encountered, in order to test the above features.

Patch Set 1 #

Patch Set 2 : Harmonize op_raw_total() and op_raw_seek() #

Patch Set 3 : Improve handling of holes (corrupt pages). #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M examples/opusfile_example.c View 2 1 chunk +5 lines, -1 line 0 comments Download
M src/opusfile.c View 1 2 3 chunks +27 lines, -6 lines 0 comments Download

Messages

Total messages: 6
derf
4 months, 2 weeks ago #1
derf
4 months, 2 weeks ago #2
derf
4 months, 2 weeks ago #3
derf
Ignore patch set 2 (operator error during rebase).
4 months, 2 weeks ago #4
tdaede
r+
4 months, 1 week ago #5
derf
4 months, 1 week ago #6

RSS Feeds Recent Issues | This issue
This is Rietveld