projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f434d01
)
Don't emit things from player that are turned off.
author
Carl Hetherington
<cth@carlh.net>
Thu, 19 Dec 2013 20:03:29 +0000
(20:03 +0000)
committer
Carl Hetherington
<cth@carlh.net>
Thu, 19 Dec 2013 20:03:29 +0000
(20:03 +0000)
src/lib/player.cc
patch
|
blob
|
history
diff --git
a/src/lib/player.cc
b/src/lib/player.cc
index bb085af8fa6240cf24e030bef027e06890aeccfd..d1098be24d8f4d3ac0e918a756c920d54277d75f 100644
(file)
--- 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);
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 */
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 ();
}
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 ();
}
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 ();
_in_subtitle.piece = earliest_piece;
_in_subtitle.subtitle = ds;
update_subtitle ();