summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-05-11 00:31:31 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commitcffb00d2625747e77a89a2cbed3e51ce04196aad (patch)
tree284931340464d18715099ef9ee3bf7f3d696343a /src/lib/ffmpeg_content.cc
parent7557ce631ab3e0b62e9683d03ef641e86a93a5de (diff)
Fix crash with no video.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc19
1 files changed, 13 insertions, 6 deletions
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