+ if (!_ffmpeg_content->audio_stream ()) {
+ return 0;
+ }
+
+ 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)
+{
+ return _file_group.read (buffer, amount);
+}
+
+int64_t
+FFmpeg::avio_seek (int64_t const pos, int whence)
+{
+ if (whence == AVSEEK_SIZE) {
+ return _file_group.length ();
+ }
+
+ return _file_group.seek (pos, whence);