[vlc-devel] [PATCH 4/6] avcodec: vlc_va_Get() mostly get the data[3] surface buffer

Steve Lhomme robux4 at videolabs.io
Thu Oct 20 15:26:11 CEST 2016


---
 modules/codec/avcodec/va.h    | 2 +-
 modules/codec/avcodec/video.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/codec/avcodec/va.h b/modules/codec/avcodec/va.h
index 4f7df66..05ef83b 100644
--- a/modules/codec/avcodec/va.h
+++ b/modules/codec/avcodec/va.h
@@ -70,7 +70,7 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj, AVCodecContext *,
  * also as a reference frame to decode other surfaces.
  *
  * @param pic pointer to VLC picture being allocated [IN/OUT]
- * @param data pointer to the AVFrame data[0] and data[3] pointers [OUT]
+ * @param data pointer to the AVFrame data[3] pointers [OUT]
  *
  * @note This function needs not be reentrant. However it may be called
  * concurrently with vlc_va_Extract() and/or vlc_va_Release() from other
diff --git a/modules/codec/avcodec/video.c b/modules/codec/avcodec/video.c
index a2c71d6..5e88eeb 100644
--- a/modules/codec/avcodec/video.c
+++ b/modules/codec/avcodec/video.c
@@ -1123,13 +1123,13 @@ static int lavc_va_GetFrame(struct AVCodecContext *ctx, AVFrame *frame,
     decoder_t *dec = ctx->opaque;
     vlc_va_t *va = dec->p_sys->p_va;
 
-    if (vlc_va_Get(va, pic, &AV_FRAME_SURFACE(frame)))
+    if (vlc_va_Get(va, pic, &AV_FRAME_SURFACE_DATA(frame)))
     {
         msg_Err(dec, "hardware acceleration picture allocation failed");
         picture_Release(pic);
         return -1;
     }
-    AV_FRAME_SURFACE_DATA(frame) = AV_FRAME_SURFACE(frame);
+    AV_FRAME_SURFACE(frame) = AV_FRAME_SURFACE_DATA(frame);
 
     void (*release)(void *) = va->release;
     if (va->release == NULL)
-- 
2.8.2



More information about the vlc-devel mailing list