From: Carl Hetherington Date: Wed, 5 Dec 2012 20:57:17 +0000 (+0000) Subject: Be more gracious when we fail to parse some subtitle types. X-Git-Tag: v2.0.48~1495 X-Git-Url: https://main.carlh.net/gitweb/?a=commitdiff_plain;h=6bb8df551b23d23f67a9391a37f6170814662b42;p=dcpomatic.git Be more gracious when we fail to parse some subtitle types. --- diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 4a6e236c3..075420b7c 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -366,7 +366,12 @@ FFmpegDecoder::pass () indicate that the previous subtitle should stop. */ if (sub.num_rects > 0) { - emit_subtitle (shared_ptr (new TimedSubtitle (sub, _first_video.get()))); + shared_ptr ts; + try { + emit_subtitle (shared_ptr (new TimedSubtitle (sub, _first_video.get()))); + } catch (...) { + /* some problem with the subtitle; we probably didn't understand it */ + } } else { emit_subtitle (shared_ptr ()); }