From 6c334975aaf31f87dd0283f391671df441022751 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 31 Aug 2015 14:31:08 +0100 Subject: Bail early from subtitle finding if there are no subtitle streams. --- src/lib/ffmpeg_examiner.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index 78d97d21e..6ed7b06fe 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -92,6 +92,7 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr c, shared_ptr c, shared_ptruses_index (_format_context, _packet.stream_index)) { audio_packet (context, _audio_streams[i]); } + if (!_audio_streams[i]->first_audio) { + got_all_audio = false; + } } for (size_t i = 0; i < _subtitle_streams.size(); ++i) { @@ -121,6 +127,11 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr c, shared_ptr