summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-22 16:53:38 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-22 16:53:38 +0100
commit24d54ea7fe1ba128cf8d3521d6738fc73a7c623e (patch)
tree7c3674e34b30f81334dc8f35a91d3cbb31b7ff9d /src/lib/ffmpeg.cc
parentd156fe45ee21fc416ce6b9e43ceed95bf42fde41 (diff)
Basics of noting subtitle times in FFmpegSubtitleStreams.
Diffstat (limited to 'src/lib/ffmpeg.cc')
-rw-r--r--src/lib/ffmpeg.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index ec7ec452e..8505626df 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -148,13 +148,13 @@ FFmpeg::setup_decoders ()
AVCodecContext* context = _format_context->streams[i]->codec;
AVCodec* codec = avcodec_find_decoder (context->codec_id);
- if (codec == 0) {
- throw DecodeError (N_("could not find decoder"));
- }
-
- if (avcodec_open2 (context, codec, 0) < 0) {
- throw DecodeError (N_("could not open decoder"));
+ if (codec) {
+ if (avcodec_open2 (context, codec, 0) < 0) {
+ throw DecodeError (N_("could not open decoder"));
+ }
}
+
+ /* We are silently ignoring any failures to find suitable decoders here */
}
}