diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-19 20:03:29 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-19 20:03:29 +0000 |
| commit | 570d4c4489b49c3915674085ee24414f738cb914 (patch) | |
| tree | 485a44749daef9909737f3f9aaa77284601f4641 /src/lib | |
| parent | f434d010e13ddf834a552be8833abb6f89767fe8 (diff) | |
Don't emit things from player that are turned off.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/player.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/player.cc b/src/lib/player.cc index bb085af8f..d1098be24 100644 --- a/src/lib/player.cc +++ b/src/lib/player.cc @@ -140,7 +140,7 @@ Player::pass () shared_ptr<DecodedAudio> da = dynamic_pointer_cast<DecodedAudio> (earliest_decoded); shared_ptr<DecodedSubtitle> ds = dynamic_pointer_cast<DecodedSubtitle> (earliest_decoded); - if (dv) { + if (dv && _video) { if (!_just_did_inaccurate_seek && earliest_time > _video_position) { /* See if we're inside some video content */ @@ -160,14 +160,14 @@ Player::pass () emit_video (earliest_piece, dv); earliest_piece->decoder->get (); } - } else if (da) { + } else if (da && _audio) { if (!_just_did_inaccurate_seek && earliest_time > _audio_position) { emit_silence (earliest_time - _audio_position); } else { emit_audio (earliest_piece, da); earliest_piece->decoder->get (); } - } else if (ds) { + } else if (ds && _video) { _in_subtitle.piece = earliest_piece; _in_subtitle.subtitle = ds; update_subtitle (); |
