From c0885f03689441ef5cbc26694e060877dffe926f Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 21 Jul 2018 22:09:29 +0100 Subject: Fix join for new caption stuff. --- src/lib/ffmpeg_content.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/ffmpeg_content.cc') diff --git a/src/lib/ffmpeg_content.cc b/src/lib/ffmpeg_content.cc index db999df20..4300dc970 100644 --- a/src/lib/ffmpeg_content.cc +++ b/src/lib/ffmpeg_content.cc @@ -140,7 +140,7 @@ FFmpegContent::FFmpegContent (shared_ptr film, vector ((*i)->video); need_audio = static_cast ((*i)->audio); - need_caption = static_cast ((*i)->caption); + need_caption = !(*i)->caption.empty(); } while (i != c.end ()) { @@ -150,7 +150,7 @@ FFmpegContent::FFmpegContent (shared_ptr film, vector ((*i)->audio)) { throw JoinError (_("Content to be joined must all have or not have audio")); } - if (need_caption != static_cast ((*i)->caption)) { + if (need_caption != !(*i)->caption.empty()) { throw JoinError (_("Content to be joined must all have or not have captions")); } ++i; @@ -163,7 +163,7 @@ FFmpegContent::FFmpegContent (shared_ptr film, vector (new CaptionContent (this, c))); } shared_ptr ref = dynamic_pointer_cast (c[0]); @@ -171,7 +171,7 @@ FFmpegContent::FFmpegContent (shared_ptr film, vector fc = dynamic_pointer_cast (c[i]); - if (fc->caption && fc->caption->use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) { + if (fc->only_caption() && fc->only_caption()->use() && *(fc->_subtitle_stream.get()) != *(ref->_subtitle_stream.get())) { throw JoinError (_("Content to be joined must use the same subtitle stream.")); } } -- cgit v1.2.3