summaryrefslogtreecommitdiff
path: root/libavcodec/vda_h264.c
diff options
context:
space:
mode:
authorXidorn Quan <quanxunzhen@gmail.com>2014-01-27 20:35:23 +0100
committerSebastien Zwickert <dilaroga@gmail.com>2014-01-27 20:36:42 +0100
commit31a0ca9e75e4c91437c8681b9655a67f09b693dd (patch)
tree0dd52d170076041c7084facf990e37b3231f787e /libavcodec/vda_h264.c
parent05e5bb6107b90f1f12348aae4373b17efbba08ff (diff)
vda: fix crash when a frame is dropped.
Signed-off-by: Sebastien Zwickert <dilaroga@gmail.com>
Diffstat (limited to 'libavcodec/vda_h264.c')
-rw-r--r--libavcodec/vda_h264.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/vda_h264.c b/libavcodec/vda_h264.c
index e0561e2914..1eff671f7f 100644
--- a/libavcodec/vda_h264.c
+++ b/libavcodec/vda_h264.c
@@ -41,6 +41,9 @@ static void vda_decoder_callback(void *vda_hw_ctx,
{
struct vda_context *vda_ctx = vda_hw_ctx;
+ if (infoFlags & kVDADecodeInfo_FrameDropped)
+ vda_ctx->cv_buffer = NULL;
+
if (!image_buffer)
return;