[FFmpeg-devel] [PATCH v6 3/3] aadec: improve seeking in mp3 content
Michael Niedermayer
michael at niedermayer.cc
Sat Jul 14 03:20:30 EEST 2018
On Fri, Jul 13, 2018 at 12:35:07PM +0200, Karsten Otto wrote:
> MP3 frames may not be aligned to aa chunk boundaries. When seeking,
> calculate the expected frame offset in the target chunk. Adjust the
> timestamp and truncate the next packet accordingly.
>
> This solution works for the majority of tested audio material. For
> some rare encodings with mp3 padding or embedded id3 tags, it will
> mispredict the correct offset, and at worst skip an extra frame.
> ---
> This revision includes some comments documenting how/why it works.
this is not what i meant.
The input can be arbitrary, and generally would be manually created to
exploit the code.
iam not at all against documenting what it "// normally," does
but the question is what makes a check unneeded
I was more thinking of a single comment in place of the missing check
explaining why it is _guranteed_ to be unneeded.
It could also be done in form of a documented av_assert0();
Also if you need a lot of text to explain this, theres a problem.
People who work on this in the future must understand what condition
they need to maintain to make this stay true.
thanks
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Does the universe only have a finite lifespan? No, its going to go on
forever, its just that you wont like living in it. -- Hiranya Peiri
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180714/2c8c75be/attachment.sig>
More information about the ffmpeg-devel
mailing list