summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-22 15:05:57 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-22 15:05:57 +0100
commita83e1ca3f9fd1550020054b8e064a8e2048b6410 (patch)
treeeb4b965c45bf831f0471ad5c2f2b130fbca32b28 /src/lib/ffmpeg_decoder.cc
parentd342a1befa88cb3f23c7e3fccfd1edaeea968fed (diff)
Set up all FFmpeg decoders in one method.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index eec70501a..7d152e490 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -67,8 +67,6 @@ FFmpegDecoder::FFmpegDecoder (shared_ptr<const FFmpegContent> c, shared_ptr<Log>
, _subtitle_codec_context (0)
, _subtitle_codec (0)
{
- setup_subtitle ();
-
/* Audio and video frame PTS values may not start with 0. We want
to fiddle them so that:
@@ -495,34 +493,8 @@ FFmpegDecoder::decode_video_packet ()
return true;
}
-
void
-FFmpegDecoder::setup_subtitle ()
-{
- boost::mutex::scoped_lock lm (_mutex);
-
- if (!_ffmpeg_content->subtitle_stream()) {
- return;
- }
-
- _subtitle_codec_context = _ffmpeg_content->subtitle_stream()->stream(_format_context)->codec;
- if (_subtitle_codec_context == 0) {
- throw DecodeError (N_("could not find subtitle stream"));
- }
-
- _subtitle_codec = avcodec_find_decoder (_subtitle_codec_context->codec_id);
-
- if (_subtitle_codec == 0) {
- throw DecodeError (N_("could not find subtitle decoder"));
- }
-
- if (avcodec_open2 (_subtitle_codec_context, _subtitle_codec, 0) < 0) {
- throw DecodeError (N_("could not open subtitle decoder"));
- }
-}
-
-void
FFmpegDecoder::decode_subtitle_packet ()
{
int got_subtitle;