[vlc-commits] avcodec: remove va parameter from hwaccel release callback

Rémi Denis-Courmont git at videolan.org
Wed Jul 24 22:42:52 CEST 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 24 23:32:27 2013 +0300| [9d1894124c70e6cb05e8dfbe310bcc7bb1ec1ce1] | committer: Rémi Denis-Courmont

avcodec: remove va parameter from hwaccel release callback

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d1894124c70e6cb05e8dfbe310bcc7bb1ec1ce1
---

 modules/codec/avcodec/dxva2.c   |    3 +--
 modules/codec/avcodec/hwdummy.c |    3 +--
 modules/codec/avcodec/va.h      |    4 ++--
 modules/codec/avcodec/vaapi.c   |    2 +-
 modules/codec/avcodec/vda.c     |    3 +--
 modules/hw/vdpau/avcodec.c      |    4 +---
 6 files changed, 7 insertions(+), 12 deletions(-)

diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 2a1c7d0..184af9e 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -471,12 +471,11 @@ static int Get(vlc_va_t *external, AVFrame *ff)
     ff->opaque = surface;
     return VLC_SUCCESS;
 }
-static void Release(vlc_va_t *external, AVFrame *ff)
+static void Release(AVFrame *ff)
 {
     vlc_va_surface_t *surface = ff->opaque;
 
     surface->refcount--;
-    (void) external;
 }
 static void Close(vlc_va_t *external)
 {
diff --git a/modules/codec/avcodec/hwdummy.c b/modules/codec/avcodec/hwdummy.c
index d050d71..95d95e5 100644
--- a/modules/codec/avcodec/hwdummy.c
+++ b/modules/codec/avcodec/hwdummy.c
@@ -69,9 +69,8 @@ static int Lock(vlc_va_t *va, AVFrame *ff)
     return VLC_SUCCESS;
 }
 
-static void Unlock(vlc_va_t *va, AVFrame *ff)
+static void Unlock(AVFrame *ff)
 {
-    (void) va;
     assert((uintptr_t)ff->opaque == SURFACE_MAGIC);
 }
 
diff --git a/modules/codec/avcodec/va.h b/modules/codec/avcodec/va.h
index 976000b..d297114 100644
--- a/modules/codec/avcodec/va.h
+++ b/modules/codec/avcodec/va.h
@@ -38,7 +38,7 @@ struct vlc_va_t {
     int  (*setup)(vlc_va_t *, void **hw, vlc_fourcc_t *output,
                   int width, int height);
     int  (*get)(vlc_va_t *, AVFrame *frame);
-    void (*release)(vlc_va_t *, AVFrame *frame);
+    void (*release)(AVFrame *frame);
     int  (*extract)(vlc_va_t *, picture_t *dst, AVFrame *src);
 };
 
@@ -94,7 +94,7 @@ static inline int vlc_va_Get(vlc_va_t *va, AVFrame *frame)
  */
 static inline void vlc_va_Release(vlc_va_t *va, AVFrame *frame)
 {
-    va->release(va, frame);
+    va->release(frame);
 }
 
 /**
diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index bf93720..7068ce4 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -518,7 +518,7 @@ static int Get( vlc_va_t *va, AVFrame *p_ff )
     return VLC_SUCCESS;
 }
 
-static void Release( vlc_va_t *va, AVFrame *p_ff )
+static void Release( AVFrame *p_ff )
 {
     vlc_va_surface_t *p_surface = p_ff->opaque;
 
diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
index 35b1097..396ba87 100644
--- a/modules/codec/avcodec/vda.c
+++ b/modules/codec/avcodec/vda.c
@@ -254,9 +254,8 @@ static int Extract( vlc_va_t *external, picture_t *p_picture, AVFrame *p_ff )
     return VLC_SUCCESS;
 }
 
-static void Release( vlc_va_t *external, AVFrame *p_ff )
+static void Release( AVFrame *p_ff )
 {
-    VLC_UNUSED( external );
     CVPixelBufferRef cv_buffer = ( CVPixelBufferRef )p_ff->data[3];
 
     if ( cv_buffer )
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index e7e3216..12af892 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -91,14 +91,12 @@ static int Lock(vlc_va_t *va, AVFrame *ff)
     return VLC_SUCCESS;
 }
 
-static void Unlock(vlc_va_t *va, AVFrame *ff)
+static void Unlock(AVFrame *ff)
 {
     vlc_vdp_video_field_t *field = ff->opaque;
 
     assert(field != NULL);
     field->destroy(field);
-
-    (void) va;
 }
 
 static int Copy(vlc_va_t *va, picture_t *pic, AVFrame *ff)



More information about the vlc-commits mailing list