Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fea0a3bb authored by Marco Nelissen's avatar Marco Nelissen Committed by android-build-merger
Browse files

Merge "Fix edge case when applying id3 unsynchronization" into lmp-dev

am: 4c75797a

Change-Id: I22f8e18c57cd96ca9d7b0b274a40aa34d34bfea3
parents 379b672b 4c75797a
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -392,8 +392,13 @@ bool ID3::removeUnsynchronizationV2_4(bool iTunesHack) {
                    --mSize;
                    --dataSize;
                }
                if (i + 1 < dataSize) {
                    // Only move data if there's actually something to move.
                    // This handles the special case of the data being only [0xff, 0x00]
                    // which should be converted to just 0xff if unsynchronization is on.
                    mData[writeOffset++] = mData[readOffset++];
                }
            }
            // move the remaining data following this frame
            if (readOffset <= oldSize) {
                memmove(&mData[writeOffset], &mData[readOffset], oldSize - readOffset);