diff --git a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp index 204cb236b0..52594bfe7d 100644 --- a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp +++ b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.cpp @@ -297,7 +297,7 @@ mp3Decoder::DecodeNextChunk() } bool -mp3Decoder::IsValidStream(uint8 *buffer, int size) +mp3Decoder::IsValidStream(const uint8 *buffer, int size) { // check 3 consecutive frame headers to make sure // that the length encoded in the header is correct, @@ -325,9 +325,9 @@ mp3Decoder::IsValidStream(uint8 *buffer, int size) } int -mp3Decoder::GetFrameLength(void *header) +mp3Decoder::GetFrameLength(const void *header) { - uint8 *h = (uint8 *)header; + const uint8 *h = static_cast(header); if (h[0] != 0xff) return -1; diff --git a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h index 3537d3580e..59bdd74d52 100644 --- a/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h +++ b/src/add-ons/media/plugins/mp3_decoder/mp3DecoderPlugin.h @@ -51,8 +51,8 @@ public: private: status_t DecodeNextChunk(); - bool IsValidStream(uint8 *buffer, int size); - int GetFrameLength(void *header); + bool IsValidStream(const uint8 *buffer, int size); + int GetFrameLength(const void *header); private: struct mpstr fMpgLibPrivate;