[vlc-devel] [PATCH 2/2] vda: avoid bad access when getting core video buffer.

Sebastien Zwickert dilaroga at gmail.com
Wed Jul 24 16:08:18 CEST 2013


The use of reference counting for video decoder introduced
by commit b217f60be52bfb3b9f03d7a38f261f84c3218365 causes
a bad access in avcodec/vda module.
---
 modules/codec/avcodec/vda.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index 76db798..13b4a64 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -258,10 +258,14 @@ static int Extract( vlc_va_t *external, picture_t *p_picture, AVFrame *p_ff )
 static void Release( vlc_va_t *external, AVFrame *p_ff )
 {
     VLC_UNUSED( external );
+#if LIBAVCODEC_VERSION_MAJOR >= 55
+    VLC_UNUSED( p_ff );
+#else
     CVPixelBufferRef cv_buffer = ( CVPixelBufferRef )p_ff->data[3];
 
     if ( cv_buffer )
         CVPixelBufferRelease( cv_buffer );
+#endif
 }
 
 static void Close( vlc_va_t *external )
-- 
1.7.9.6 (Apple Git-31.1)




More information about the vlc-devel mailing list