summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-06-27 11:16:37 +0100
committerCarl Hetherington <cth@carlh.net>2014-06-27 11:16:37 +0100
commit2f99a801dfb1668d7efda4eb8a3f5638d2fe20d2 (patch)
tree69117c856701cdfe96206f8cee12b2dd34f070fa /src/lib/ffmpeg.cc
parent76ce03b70441e2552f2ad62dc116e75b2f6dcf3c (diff)
Fix confusion about subtitle codec pointers.
Diffstat (limited to 'src/lib/ffmpeg.cc')
-rw-r--r--src/lib/ffmpeg.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/ffmpeg.cc b/src/lib/ffmpeg.cc
index 8505626df..f5af239b0 100644
--- a/src/lib/ffmpeg.cc
+++ b/src/lib/ffmpeg.cc
@@ -26,6 +26,7 @@ extern "C" {
#include "ffmpeg.h"
#include "ffmpeg_content.h"
#include "ffmpeg_audio_stream.h"
+#include "ffmpeg_subtitle_stream.h"
#include "exceptions.h"
#include "util.h"
@@ -174,6 +175,16 @@ FFmpeg::audio_codec_context () const
return _ffmpeg_content->audio_stream()->stream(_format_context)->codec;
}
+AVCodecContext *
+FFmpeg::subtitle_codec_context () const
+{
+ if (!_ffmpeg_content->subtitle_stream ()) {
+ return 0;
+ }
+
+ return _ffmpeg_content->subtitle_stream()->stream(_format_context)->codec;
+}
+
int
FFmpeg::avio_read (uint8_t* buffer, int const amount)
{