From 89ab1bfba5b81d49eb8d9c1c8cdc254823997f15 Mon Sep 17 00:00:00 2001 From: Abs62 Date: Wed, 16 Jul 2014 17:59:25 +0400 Subject: [PATCH] Adjust code for Qt5 --- ffmpegaudio.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ffmpegaudio.cc b/ffmpegaudio.cc index 1c42e3ef..066a6d81 100644 --- a/ffmpegaudio.cc +++ b/ffmpegaudio.cc @@ -356,11 +356,11 @@ bool DecoderContext::play( QString & errorString ) do { int len = avcodec_decode_audio4( codecContext_, frame, &gotFrame, &pack ); - if ( !isCancelled_ && gotFrame ) + if ( !Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) && gotFrame ) { playFrame( frame ); } - if( len <= 0 || isCancelled_ ) + if( len <= 0 || Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) ) break; pack.size -= len; pack.data += len;