summaryrefslogtreecommitdiff
path: root/src/lib/video_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-01-19 00:26:27 +0000
committerCarl Hetherington <cth@carlh.net>2015-01-19 00:26:27 +0000
commit54c0378137091de604b8c0d6d98959b55b0cddb6 (patch)
treebc591c0e59c5cc2ba1054c1fcc612bf73e8d6eaf /src/lib/video_decoder.cc
parent5282bd42dbe7f9c114abc6f648cb65ef52c35cf4 (diff)
Fix audio analysis; make sure we don't decode video and let it pile up unwanted.
Diffstat (limited to 'src/lib/video_decoder.cc')
-rw-r--r--src/lib/video_decoder.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc
index cac5f2795..b7cf1641b 100644
--- a/src/lib/video_decoder.cc
+++ b/src/lib/video_decoder.cc
@@ -42,6 +42,7 @@ VideoDecoder::VideoDecoder (shared_ptr<const VideoContent> c)
: _video_content (c)
#endif
, _last_seek_accurate (true)
+ , _ignore_video (false)
{
_black_image.reset (new Image (PIX_FMT_RGB24, _video_content->video_size(), true));
_black_image->make_black ();
@@ -233,6 +234,10 @@ VideoDecoder::fill_3d (VideoFrame from, VideoFrame to, Eyes eye)
void
VideoDecoder::video (shared_ptr<const ImageProxy> image, VideoFrame frame)
{
+ if (_ignore_video) {
+ return;
+ }
+
/* We may receive the same frame index twice for 3D, and we need to know
when that happens.
*/
@@ -315,3 +320,10 @@ VideoDecoder::seek (ContentTime s, bool accurate)
_last_seek_time = s;
_last_seek_accurate = accurate;
}
+
+/** Set this player never to produce any video data */
+void
+VideoDecoder::set_ignore_video ()
+{
+ _ignore_video = true;
+}