From b68fb4c103b5580509070c7733d3ae7deb46c3ce Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 1 Jun 2019 00:27:57 +0100 Subject: Basics of allowing video parts of FFmpegContent to be disabled (#1355 and others). --- src/lib/ffmpeg_decoder.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/ffmpeg_decoder.cc') diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index c52723da3..cbde534c3 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -80,7 +80,7 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr film, shared_ptrvideo) { + if (c->video && c->video->use()) { video.reset (new VideoDecoder (this, c)); _pts_offset = pts_offset (c->ffmpeg_audio_streams(), c->first_video(), c->active_video_frame_rate(film)); /* It doesn't matter what size or pixel format this is, it just needs to be black */ @@ -185,7 +185,7 @@ FFmpegDecoder::pass () int const si = _packet.stream_index; shared_ptr fc = _ffmpeg_content; - if (_video_stream && si == _video_stream.get() && !video->ignore()) { + if (_video_stream && si == _video_stream.get() && video && !video->ignore()) { decode_video_packet (); } else if (fc->subtitle_stream() && fc->subtitle_stream()->uses_index(_format_context, si) && !only_text()->ignore()) { decode_subtitle_packet (); -- cgit v1.2.3