[vlc-commits] va: remove description field
Rémi Denis-Courmont
git at videolan.org
Tue Jan 15 17:24:07 CET 2019
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jan 14 21:58:02 2019 +0200| [2bea3743af346cd76ad2c02c168dd6845c45a10a] | committer: Rémi Denis-Courmont
va: remove description field
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2bea3743af346cd76ad2c02c168dd6845c45a10a
---
modules/codec/avcodec/d3d11va.c | 8 ++++----
modules/codec/avcodec/dxva2.c | 8 ++++----
modules/codec/avcodec/va.h | 2 --
modules/codec/avcodec/vaapi.c | 2 --
modules/hw/vdpau/avcodec.c | 3 ---
5 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index 6b1730a935..c8e60d7ff1 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -304,7 +304,6 @@ static void Close(vlc_va_t *va, void **ctx)
D3D11_Destroy( &sys->hd3d );
- free((char *)va->description);
free(sys);
}
@@ -395,14 +394,15 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
if (err != VLC_SUCCESS)
goto error;
+ /* TODO print the hardware name/vendor for debugging purposes */
char *desc = DxDescribe(sys);
- if (desc != NULL)
+ if (desc != NULL) {
msg_Info(va, "Using %s", desc);
+ free(desc);
+ }
ctx->hwaccel_context = &sys->hw;
- /* TODO print the hardware name/vendor for debugging purposes */
- va->description = desc;
va->get = Get;
return VLC_SUCCESS;
diff --git a/modules/codec/avcodec/dxva2.c b/modules/codec/avcodec/dxva2.c
index 60f24b234e..d8ef4b2558 100644
--- a/modules/codec/avcodec/dxva2.c
+++ b/modules/codec/avcodec/dxva2.c
@@ -248,7 +248,6 @@ static void Close(vlc_va_t *va, void **ctx)
if (sys->dxva2_dll)
FreeLibrary(sys->dxva2_dll);
- free((char *)va->description);
free(sys);
}
@@ -327,14 +326,15 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
if (err != VLC_SUCCESS)
goto error;
+ /* TODO print the hardware name/vendor for debugging purposes */
char *desc = DxDescribe(sys);
- if (desc != NULL)
+ if (desc != NULL) {
msg_Info(va, "Using %s", desc);
+ free(desc);
+ }
ctx->hwaccel_context = &sys->hw;
- /* TODO print the hardware name/vendor for debugging purposes */
- va->description = desc;
va->get = Get;
return VLC_SUCCESS;
diff --git a/modules/codec/avcodec/va.h b/modules/codec/avcodec/va.h
index 51494cbbd1..b5f61c23a9 100644
--- a/modules/codec/avcodec/va.h
+++ b/modules/codec/avcodec/va.h
@@ -33,8 +33,6 @@ struct vlc_va_t {
struct vlc_common_members obj;
vlc_va_sys_t *sys;
- const char *description;
-
int (*get)(vlc_va_t *, picture_t *pic, uint8_t **surface);
};
diff --git a/modules/codec/avcodec/vaapi.c b/modules/codec/avcodec/vaapi.c
index 206efd873a..0121910b97 100644
--- a/modules/codec/avcodec/vaapi.c
+++ b/modules/codec/avcodec/vaapi.c
@@ -212,7 +212,6 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt,
ctx->hwaccel_context = &sys->hw_ctx;
va->sys = sys;
- va->description = vaQueryVendorString(sys->hw_ctx.display);
va->get = Get;
return VLC_SUCCESS;
@@ -333,7 +332,6 @@ static int CreateDRM(vlc_va_t *va, AVCodecContext *ctx, enum PixelFormat pix_fmt
ctx->hwaccel_context = &sys->hw_ctx;
va->sys = sys;
- va->description = vaQueryVendorString(sys->hw_ctx.display);
va->get = GetDRM;
return VLC_SUCCESS;
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index ac78d0808c..604d548e1e 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -194,10 +194,7 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
const char *infos;
if (vdp_get_information_string(sys->vdp, &infos) == VDP_STATUS_OK)
msg_Info(va, "Using %s", infos);
- else
- infos = "VDPAU";
- va->description = infos;
va->get = Lock;
return VLC_SUCCESS;
More information about the vlc-commits
mailing list