summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ffmpeg.h')
-rw-r--r--src/lib/ffmpeg.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/ffmpeg.h b/src/lib/ffmpeg.h
index b0769971e..59b2dedd5 100644
--- a/src/lib/ffmpeg.h
+++ b/src/lib/ffmpeg.h
@@ -75,11 +75,14 @@ protected:
AVFormatContext* _format_context = nullptr;
std::vector<AVCodecContext*> _codec_context;
- AVFrame* _frame = nullptr;
+ /** AVFrame used for decoding video */
+ AVFrame* _video_frame = nullptr;
/** Index of video stream within AVFormatContext */
boost::optional<int> _video_stream;
+ AVFrame* audio_frame (std::shared_ptr<const FFmpegAudioStream> stream);
+
/* It would appear (though not completely verified) that one must have
a mutex around calls to avcodec_open* and avcodec_close... and here
it is.
@@ -92,6 +95,9 @@ private:
static void ffmpeg_log_callback (void* ptr, int level, const char* fmt, va_list vl);
static std::weak_ptr<Log> _ffmpeg_log;
+
+ /** AVFrames used for decoding audio streams; accessed with audio_frame() */
+ std::map<std::shared_ptr<const FFmpegAudioStream>, AVFrame*> _audio_frame;
};