summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-05-10 13:26:55 +0100
committerCarl Hetherington <cth@carlh.net>2016-05-18 11:50:29 +0100
commit90becb40eb48467b6d31d6939bcfcf39c3c9652c (patch)
treeae36f3eb019334ba214160eec52e81ab4c65f014 /src/lib/ffmpeg_content.cc
parentcc76b517f6a74f813ae38137bdc88ff3bafa6dd9 (diff)
Some allowances for video/audio/subtitle possibly being null.
Diffstat (limited to 'src/lib/ffmpeg_content.cc')
-rw-r--r--src/lib/ffmpeg_content.cc15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc
index a8206b13e..a0bf88c25 100644
--- a/src/lib/ffmpeg_content.cc
+++ b/src/lib/ffmpeg_content.cc
@@ -156,9 +156,18 @@ FFmpegContent::as_xml (xmlpp::Node* node) const
{
node->add_child("Type")->add_child_text ("FFmpeg");
Content::as_xml (node);
- video->as_xml (node);
- audio->as_xml (node);
- subtitle->as_xml (node);
+
+ if (video) {
+ video->as_xml (node);
+ }
+
+ if (audio) {
+ audio->as_xml (node);
+ }
+
+ if (subtitle) {
+ subtitle->as_xml (node);
+ }
boost::mutex::scoped_lock lm (_mutex);