Permalink
Browse files

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.
(cherry picked from commit 8c33e3f)
  • Loading branch information...
1 parent 25ffbc3 commit dcc9b96c4680820576c3d7979ecba222dbdc3730 Mark Kendall committed with tralph Feb 11, 2011
Showing with 10 additions and 8 deletions.
  1. +10 −8 mythtv/libs/libmythtv/mythplayer.cpp
@@ -966,7 +966,7 @@ int MythPlayer::OpenFile(uint retries, bool allow_libmpeg2)
decoder->setWatchingRecording(watchingrecording);
decoder->setTranscoding(transcoding);
CheckExtraAudioDecode();
- //noVideoTracks = !decoder->GetTrackCount(kTrackTypeVideo);
+ noVideoTracks = !decoder->GetTrackCount(kTrackTypeVideo);
decoderEof = false;
@@ -2073,7 +2073,7 @@ void MythPlayer::VideoStart(void)
bool MythPlayer::VideoLoop(void)
{
- if (videoPaused || isDummy || noVideoTracks)
+ if (videoPaused || isDummy /*|| noVideoTracks*/)
{
usleep(frame_interval);
DisplayPauseFrame();
@@ -2529,7 +2529,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();
@@ -2762,11 +2762,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();
@@ -2805,8 +2807,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;
}

0 comments on commit dcc9b96

Please sign in to comment.