Skip to content

Instantly share code, notes, and snippets.

@tmm1
Created February 12, 2017 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmm1/8177164dd929b96fc72702aed65cd71d to your computer and use it in GitHub Desktop.
Save tmm1/8177164dd929b96fc72702aed65cd71d to your computer and use it in GitHub Desktop.
diff --git a/libavcodec/videotoolbox.c b/libavcodec/videotoolbox.c
index b21eccb..2c34cbb 100644
--- a/libavcodec/videotoolbox.c
+++ b/libavcodec/videotoolbox.c
@@ -315,6 +315,11 @@ static void videotoolbox_decoder_callback(void *opaque,
return;
}
+ if (flags & kVTDecodeInfo_FrameDropped) {
+ av_log(NULL, AV_LOG_DEBUG, "vt decoder cb: frame dropped\n");
+ return;
+ }
+
vtctx->frame = CVPixelBufferRetain(image_buffer);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment