From cffb00d2625747e77a89a2cbed3e51ce04196aad Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 11 May 2016 00:31:31 +0100 Subject: Fix crash with no video. --- src/lib/ffmpeg_content.cc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/lib/ffmpeg_content.cc') diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index 32c2dee8b..fdbdd4eb5 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -276,12 +276,19 @@ FFmpegContent::technical_summary () const string filt = Filter::ffmpeg_string (_filters); - return Content::technical_summary() + " - " - + video->technical_summary() + " - " - + audio->technical_summary() + " - " - + String::compose ( - "ffmpeg: audio %1 subtitle %2 filters %3", as, ss, filt - ); + string s = Content::technical_summary (); + + if (video) { + s += " - " + video->technical_summary (); + } + + if (audio) { + s += " - " + audio->technical_summary (); + } + + return s + String::compose ( + "ffmpeg: audio %1 subtitle %2 filters %3", as, ss, filt + ); } void -- cgit v1.2.3