Adjust code for Qt5

This commit is contained in:
Abs62 2014-07-16 17:59:25 +04:00
parent 531aa79805
commit 89ab1bfba5

View file

@ -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;