summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Kendall <mkendall@mythtv.org>2011-02-11 06:11:11 (GMT)
committer Mark Kendall <mkendall@mythtv.org>2011-02-11 06:11:11 (GMT)
commit8c33e3f1e296e2f616d45e1ca2c085396c7f693b (patch)
tree51dba58a1f92877535e695bddb7867b44baca293
parent1b754e89d3caf6559b4dd1da3208b4da9fbe2d41 (diff)
Re-enable setting MythPlayer::noVideoTracks
but don't use it to handle audio only tracks (yet). This is needed to identify audio only dvb-t streams.
-rw-r--r--mythtv/libs/libmythtv/mythplayer.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/mythtv/libs/libmythtv/mythplayer.cpp b/mythtv/libs/libmythtv/mythplayer.cpp
index 1ab055c..0d72165 100644
--- a/mythtv/libs/libmythtv/mythplayer.cpp
+++ b/mythtv/libs/libmythtv/mythplayer.cpp
@@ -971,7 +971,7 @@ int MythPlayer::OpenFile(uint retries, bool allow_libmpeg2)
decoder->setWatchingRecording(watchingrecording);
decoder->setTranscoding(transcoding);
CheckExtraAudioDecode();
- //noVideoTracks = !decoder->GetTrackCount(kTrackTypeVideo);
+ noVideoTracks = !decoder->GetTrackCount(kTrackTypeVideo);
// Set 'no_video_decode' to true for audio only decodeing
bool no_video_decode = false;
@@ -2139,7 +2139,7 @@ void MythPlayer::VideoStart(void)
bool MythPlayer::VideoLoop(void)
{
- if (videoPaused || isDummy || noVideoTracks)
+ if (videoPaused || isDummy /*|| noVideoTracks*/)
{
usleep(frame_interval);
DisplayPauseFrame();
@@ -2595,7 +2595,7 @@ void MythPlayer::EventLoop(void)
// Disable rewind if we are too close to the beginning of the buffer
if (CalcRWTime(-ffrew_skip) > 0 &&
- (!noVideoTracks && (framesPlayed <= keyframedist)))
+ (/*!noVideoTracks && */(framesPlayed <= keyframedist)))
{
VERBOSE(VB_PLAYBACK, LOC + "Near start, stopping rewind.");
float stretch = (ffrew_skip > 0) ? 1.0f : audio.GetStretchFactor();
@@ -2844,11 +2844,13 @@ void MythPlayer::DecoderLoop(bool pause)
while (!killdecoder && !IsErrored())
{
- //noVideoTracks = decoder &&
- // !decoder->GetTrackCount(kTrackTypeVideo);
-
DecoderPauseCheck();
+ decoder_change_lock.lock();
+ if (decoder)
+ noVideoTracks = !decoder->GetTrackCount(kTrackTypeVideo);
+ decoder_change_lock.unlock();
+
if (forcePositionMapSync)
{
decoder_change_lock.lock();
@@ -2887,8 +2889,8 @@ void MythPlayer::DecoderLoop(bool pause)
DecodeType dt = (audio.HasAudioOut() && normal_speed) ?
kDecodeAV : kDecodeVideo;
- if (noVideoTracks && audio.HasAudioOut())
- dt = kDecodeAudio;
+ //if (noVideoTracks && audio.HasAudioOut())
+ // dt = kDecodeAudio;
DecoderGetFrame(dt);
decodeOneFrame = false;
}