diff options
author | wm4 <nfxjfg@googlemail.com> | 2018-01-30 13:22:53 +0100 |
---|---|---|
committer | wm4 <nfxjfg@googlemail.com> | 2018-02-04 15:19:41 +0100 |
commit | 48bc9fffd11c05e75b9125d8cd90e9263108bd83 (patch) | |
tree | 987e904885227f70d96d69245e58460f280b1132 /libavcodec/metasound_data.c | |
parent | ff46124b0df17a1d35249e09ae8eae9a61f16e04 (diff) | |
download | ffmpeg-48bc9fffd11c05e75b9125d8cd90e9263108bd83.tar.gz |
id3v2: fix unsynchronization
The ID3v2 "unsynchronization scheme" requires replacing any 0xFF 0x00
sequences with 0xFF. This has to be done on every byte of the source
data, while the current code skipped a byte after a replacement. This
meant 0xFF 0x00 0xFF 00 was translated to 0xFF 0xFF 0x00 instead of 0xFF
0xFF. It feels a bit messy to do this correctly with the avio use. But
fortunately, this translation can be done in-place, so we can just do it
in memory.
Inspired by what taglib does.
Also see 9ae80e6a9cefcab61e867256ba19ef78a4bfe0cb. (The sample file for
that commit is gone, so it could not be retested.)
Diffstat (limited to 'libavcodec/metasound_data.c')
0 files changed, 0 insertions, 0 deletions