summaryrefslogtreecommitdiff
path: root/src/lib/video_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-08-13 17:37:52 +0100
committerCarl Hetherington <cth@carlh.net>2018-08-14 00:05:06 +0100
commit1fe6bd7f8ba059322b8357b2210f0fd590567ce2 (patch)
tree2c76fbf24b9b520f94f741040f11dc920d3bab91 /src/lib/video_content.cc
parentf30ad4dec0a3fa5f1770fba93106a3e8910d66ba (diff)
More fixes for errors / crashes / misbehaviour with content changes
and the butler. Here we signal both before and after a change in content. Before, the player disables itself so that any pass()/seek() will be no-ops. After, the player rebuilds its pieces and the butler re-seeks to get back to where it was before the change.
Diffstat (limited to 'src/lib/video_content.cc')
-rw-r--r--src/lib/video_content.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/video_content.cc b/src/lib/video_content.cc
index d3ba6c1ab..81f4138fb 100644
--- a/src/lib/video_content.cc
+++ b/src/lib/video_content.cc
@@ -234,6 +234,10 @@ VideoContent::take_from_examiner (shared_ptr<VideoExaminer> d)
optional<double> const ar = d->sample_aspect_ratio ();
bool const yuv = d->yuv ();
+ ContentChange cc1 (_parent, VideoContentProperty::SIZE);
+ ContentChange cc2 (_parent, VideoContentProperty::SCALE);
+ ContentChange cc3 (_parent, ContentProperty::LENGTH);
+
{
boost::mutex::scoped_lock lm (_mutex);
_size = vs;
@@ -256,10 +260,6 @@ VideoContent::take_from_examiner (shared_ptr<VideoExaminer> d)
if (d->video_frame_rate()) {
_parent->set_video_frame_rate (d->video_frame_rate().get());
}
-
- _parent->signal_changed (VideoContentProperty::SIZE);
- _parent->signal_changed (VideoContentProperty::SCALE);
- _parent->signal_changed (ContentProperty::LENGTH);
}
/** @return string which includes everything about how this content looks */