summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2010-12-20 11:19:59 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2010-12-20 11:19:59 (GMT)
commit3cf32e89b6cad9f915bda1820ecc0b94fd6f0cdb (patch)
tree91a90ea33475509b806c327692a121a970bc710f
parent1ef81e13788c86ff518aabb13d8d286d0617ed71 (diff)
Fix audio-only playback
-rw-r--r--mythtv/libs/libmythtv/avformatdecoder.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index 5bfab27..7941911 100644
--- a/mythtv/libs/libmythtv/avformatdecoder.cpp
+++ b/mythtv/libs/libmythtv/avformatdecoder.cpp
@@ -3928,10 +3928,6 @@ bool AvFormatDecoder::ProcessAudioPacket(AVStream *curstream, AVPacket *pkt,
int audSubIdx = selectedTrack[kTrackTypeAudio].av_substream_index;
avcodeclock->unlock();
- uint ofill = 0, ototal = 0, othresh = 0, total_decoded_audio = 0;
- allowedquit = (!(decodetype & kDecodeAudio)) &&
- m_audio->IsBufferAlmostFull();
-
if (pkt->dts != (int64_t)AV_NOPTS_VALUE)
pts = (long long)(av_q2d(curstream->time_base) * pkt->dts * 1000);
@@ -4092,9 +4088,9 @@ bool AvFormatDecoder::ProcessAudioPacket(AVStream *curstream, AVPacket *pkt,
m_audio->AddAudioData((char *)audioSamples, data_size, temppts);
- total_decoded_audio += data_size;
-
- allowedquit |= ringBuffer->InDVDMenuOrStillFrame();
+ allowedquit |=
+ ringBuffer->InDVDMenuOrStillFrame() ||
+ m_audio->IsBufferAlmostFull();
tmp_pkt.data += ret;
tmp_pkt.size -= ret;