Use a separate callback to indicate EOS instead of renderFrame()

This commit is contained in:
Cameron Gutman 2022-04-07 21:30:20 -05:00
commit 474591c6a5
12 changed files with 18 additions and 50 deletions

View file

@ -102,6 +102,11 @@ public:
virtual bool prepareDecoderContext(AVCodecContext* context, AVDictionary** options) = 0;
virtual void renderFrame(AVFrame* frame) = 0;
// Called on the same thread as renderFrame() during destruction of the renderer
virtual void cleanupRenderContext() {
// Nothing
}
virtual bool testRenderFrame(AVFrame*) {
// If the renderer doesn't provide an explicit test routine,
// we will always assume that any returned AVFrame can be