[mythtv] [PATCH] AC3 passthrough fallback
John Patrick Poet
john at BlueSkyTours.com
Fri Aug 6 20:12:41 EDT 2004
Currently, when "enable AC3 to SPDIF passthrough" is checked, non-AC3
audio streams will not play via S/PDIF.
This patch allows non-AC3 streams to play via S/PDIF even when "AC3 to
SPDIF" is enabled.
John
-------------- next part --------------
Index: libs/libmythtv/avformatdecoder.cpp
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libmythtv/avformatdecoder.cpp,v
retrieving revision 1.90
diff -u -d -r1.90 avformatdecoder.cpp
--- libs/libmythtv/avformatdecoder.cpp 5 Aug 2004 07:35:00 -0000 1.90
+++ libs/libmythtv/avformatdecoder.cpp 7 Aug 2004 00:01:57 -0000
@@ -65,8 +65,6 @@
av_log_set_level(AV_LOG_DEBUG);
else
av_log_set_level(AV_LOG_ERROR);
-
- do_ac3_passthru = gContext->GetNumSetting("AC3PassThru", false);
}
AvFormatDecoder::~AvFormatDecoder()
@@ -419,7 +417,10 @@
{
bitrate += enc->bit_rate;
m_parent->SetEffDsp(enc->sample_rate * 100);
- if (do_ac3_passthru && enc->codec_id == CODEC_ID_AC3)
+
+ do_ac3_passthru = enc->codec_id == CODEC_ID_AC3 &&
+ gContext->GetNumSetting("AC3PassThru", false);
+ if (do_ac3_passthru)
{
// An AC3 stream looks like a 48KHz 2ch audio stream to
// the sound card
More information about the mythtv-dev
mailing list