From 2e25be8f717f73281201e3d466b47865238b8c4d Mon Sep 17 00:00:00 2001 From: Igor Kushnir Date: Wed, 21 Mar 2018 18:51:18 +0200 Subject: [PATCH] Eliminate redundant casts to/from void* in Ffmpeg player --- ffmpegaudio.cc | 4 ++-- ffmpegaudio.hh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ffmpegaudio.cc b/ffmpegaudio.cc index 04c35d85..c1d9aaac 100644 --- a/ffmpegaudio.cc +++ b/ffmpegaudio.cc @@ -61,10 +61,10 @@ AudioPlayer::~AudioPlayer() ao_shutdown(); } -void AudioPlayer::playMemory( const void * ptr, int size ) +void AudioPlayer::playMemory( const char * ptr, int size ) { emit cancelPlaying( false ); - QByteArray audioData( ( char * )ptr, size ); + QByteArray audioData( ptr, size ); DecoderThread * thread = new DecoderThread( audioData, this ); connect( thread, SIGNAL( error( QString ) ), this, SIGNAL( error( QString ) ) ); diff --git a/ffmpegaudio.hh b/ffmpegaudio.hh index 866edf8d..dd10cd4b 100644 --- a/ffmpegaudio.hh +++ b/ffmpegaudio.hh @@ -18,7 +18,7 @@ class AudioPlayer : public QObject public: static AudioPlayer & instance(); - void playMemory( const void * ptr, int size ); + void playMemory( const char * ptr, int size ); void stop(); signals: