mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-23 23:54:05 +00:00
Adjust code for Qt5
This commit is contained in:
parent
531aa79805
commit
89ab1bfba5
|
@ -356,11 +356,11 @@ bool DecoderContext::play( QString & errorString )
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
int len = avcodec_decode_audio4( codecContext_, frame, &gotFrame, &pack );
|
int len = avcodec_decode_audio4( codecContext_, frame, &gotFrame, &pack );
|
||||||
if ( !isCancelled_ && gotFrame )
|
if ( !Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) && gotFrame )
|
||||||
{
|
{
|
||||||
playFrame( frame );
|
playFrame( frame );
|
||||||
}
|
}
|
||||||
if( len <= 0 || isCancelled_ )
|
if( len <= 0 || Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) )
|
||||||
break;
|
break;
|
||||||
pack.size -= len;
|
pack.size -= len;
|
||||||
pack.data += len;
|
pack.data += len;
|
||||||
|
|
Loading…
Reference in a new issue