summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Yves Avenard <jyavenard@mythtv.org>2011-02-26 02:09:29 (GMT)
committer Jean-Yves Avenard <jyavenard@mythtv.org>2011-02-26 02:09:29 (GMT)
commitf169dd96609ba58f8b7c59977e13a9c92b6aed0c (patch)
tree0ac8d8a6086b87feda127af72bfb14dbc54f56d7
parente0a77202537aca7809371697e57eed5b8151b6aa (diff)
Fix timestamp estimates for digital audio passthrough
-rw-r--r--mythtv/libs/libmythtv/avformatdecoder.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
index 0e6c7ef..78b1934 100644
--- a/mythtv/libs/libmythtv/avformatdecoder.cpp
+++ b/mythtv/libs/libmythtv/avformatdecoder.cpp
@@ -4125,7 +4125,7 @@ bool AvFormatDecoder::ProcessAudioPacket(AVStream *curstream, AVPacket *pkt,
// calc for next frame
lastapts += (long long)
((double)(data_size * 1000) /
- (ctx->sample_rate * ctx->channels *
+ (ctx->sample_rate * (audioOut.do_passthru ? 2 : ctx->channels) *
av_get_bits_per_sample_format(ctx->sample_fmt)>>3));
VERBOSE(VB_PLAYBACK+VB_TIMESTAMP,