Send a null AVFrame to indicate end of stream to allow renderers to do render thread cleanup

This commit is contained in:
Cameron Gutman
2020-05-13 18:55:21 -07:00
parent 5ed7e03b2e
commit 51e9ab83ad
9 changed files with 48 additions and 0 deletions
@@ -158,6 +158,11 @@ public:
// Caller frees frame after we return
virtual void renderFrame(AVFrame* frame) override
{
if (frame == nullptr) {
// End of stream - nothing to do for us
return;
}
OSStatus status;
CVPixelBufferRef pixBuf = reinterpret_cast<CVPixelBufferRef>(frame->data[3]);