Stop Ffmpeg::AudioService in Ffmpeg::~AudioPlayer()

When the current audio player instance changes, the destroyed player's
playback must be stopped for consistency between implementations and to
avoid surprises. Note that this residual playback could be stopped only
by switching back to the Ffmpeg player or by exiting the application.
This commit is contained in:
Igor Kushnir 2018-04-01 15:15:07 +03:00
parent b34ac9630e
commit fb71eb4ce1

View file

@ -22,6 +22,11 @@ public:
this, SIGNAL( error( QString ) ) );
}
~AudioPlayer()
{
stop();
}
virtual QString play( const char * data, int size )
{
AudioService::instance().playMemory( data, size );