summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-12-05 20:57:17 +0000
committerCarl Hetherington <cth@carlh.net>2012-12-05 20:57:17 +0000
commit6bb8df551b23d23f67a9391a37f6170814662b42 (patch)
tree8d30654a82c24f5456c1b0cdfd8afff167ee308a /src/lib/ffmpeg_decoder.cc
parent2231b171b4b624f4b747031727f61bd93f80957f (diff)
Be more gracious when we fail to parse some subtitle types.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc7
1 files changed, 6 insertions, 1 deletions
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<TimedSubtitle> (new TimedSubtitle (sub, _first_video.get())));
+ shared_ptr<TimedSubtitle> ts;
+ try {
+ emit_subtitle (shared_ptr<TimedSubtitle> (new TimedSubtitle (sub, _first_video.get())));
+ } catch (...) {
+ /* some problem with the subtitle; we probably didn't understand it */
+ }
} else {
emit_subtitle (shared_ptr<TimedSubtitle> ());
}