summaryrefslogtreecommitdiff
path: root/libavcodec/vda.c
diff options
context:
space:
mode:
authorSebastien Zwickert <dilaroga@free.fr>2011-11-11 03:38:13 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-11 16:23:23 +0100
commit89d7f9266189bed4b41ad9d66289174355ef759e (patch)
treeb64e6ed1dabf693d6e64bf7b1cd16f1ba58f188e /libavcodec/vda.c
parent7437db84a9d39ca7a50c07fae68bf4106b0fc88c (diff)
vda: use fast reallocation.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vda.c')
-rw-r--r--libavcodec/vda.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/vda.c b/libavcodec/vda.c
index 61cb81e0ff..55012ceff5 100644
--- a/libavcodec/vda.c
+++ b/libavcodec/vda.c
@@ -168,6 +168,9 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
CFMutableDictionaryRef io_surface_properties;
CFNumberRef cv_pix_fmt;
+ vda_ctx->bitstream = NULL;
+ vda_ctx->ref_size = 0;
+
if (av_lockmgr_register(vda_lock_operation))
return -1;
@@ -239,6 +242,9 @@ int ff_vda_destroy_decoder(struct vda_context *vda_ctx)
if (vda_ctx->queue_mutex != NULL)
vda_lock_operation(&vda_ctx->queue_mutex, AV_LOCK_DESTROY);
+ if (vda_ctx->bitstream)
+ av_freep(&vda_ctx->bitstream);
+
if (kVDADecoderNoErr != status)
return status;