Commit 313038e3 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

va: make the description pointer const

4 out of 5 plugins expect it that way and the owner should not modify
the string anyway.
parent d19f27a9
...@@ -478,7 +478,7 @@ static void Close(vlc_va_t *va) ...@@ -478,7 +478,7 @@ static void Close(vlc_va_t *va)
if (sys->hd3d9_dll) if (sys->hd3d9_dll)
FreeLibrary(sys->hd3d9_dll); FreeLibrary(sys->hd3d9_dll);
free(va->description); free((char *)va->description);
free(sys); free(sys);
} }
......
...@@ -124,7 +124,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, const es_format_t *fmt) ...@@ -124,7 +124,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, const es_format_t *fmt)
hwctx->render = Render; hwctx->render = Render;
va->sys = (vlc_va_sys_t *)hwctx; va->sys = (vlc_va_sys_t *)hwctx;
va->description = (char *)"Dummy video decoding accelerator"; va->description = "Dummy video decoding accelerator";
va->pix_fmt = AV_PIX_FMT_VDPAU; va->pix_fmt = AV_PIX_FMT_VDPAU;
va->setup = Setup; va->setup = Setup;
va->get = Lock; va->get = Lock;
......
...@@ -32,7 +32,7 @@ struct vlc_va_t { ...@@ -32,7 +32,7 @@ struct vlc_va_t {
vlc_va_sys_t *sys; vlc_va_sys_t *sys;
module_t *module; module_t *module;
char *description; const char *description;
int pix_fmt; int pix_fmt;
int (*setup)(vlc_va_t *, void **hw, vlc_fourcc_t *output, int (*setup)(vlc_va_t *, void **hw, vlc_fourcc_t *output,
......
...@@ -239,7 +239,7 @@ static int Open( vlc_va_t *va, int i_codec_id, int i_thread_count ) ...@@ -239,7 +239,7 @@ static int Open( vlc_va_t *va, int i_codec_id, int i_thread_count )
vlc_mutex_init(&sys->lock); vlc_mutex_init(&sys->lock);
va->sys = sys; va->sys = sys;
va->description = (char *)vaQueryVendorString( sys->p_display ); va->description = vaQueryVendorString( sys->p_display );
return VLC_SUCCESS; return VLC_SUCCESS;
error: error:
......
...@@ -115,7 +115,7 @@ static int Open( vlc_va_t *external, AVCodecContext *ctx, ...@@ -115,7 +115,7 @@ static int Open( vlc_va_t *external, AVCodecContext *ctx,
p_va->i_extradata = fmt->i_extra; p_va->i_extradata = fmt->i_extra;
external->sys = p_va; external->sys = p_va;
external->description = (char *)"VDA"; external->description = "VDA";
external->pix_fmt = PIX_FMT_VDA_VLD; external->pix_fmt = PIX_FMT_VDA_VLD;
external->setup = Setup; external->setup = Setup;
external->get = Get; external->get = Get;
......
...@@ -278,7 +278,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, const es_format_t *fmt) ...@@ -278,7 +278,7 @@ static int Open(vlc_va_t *va, AVCodecContext *ctx, const es_format_t *fmt)
infos = "VDPAU"; infos = "VDPAU";
va->sys = sys; va->sys = sys;
va->description = (char *)infos; va->description = infos;
va->pix_fmt = AV_PIX_FMT_VDPAU; va->pix_fmt = AV_PIX_FMT_VDPAU;
va->setup = Setup; va->setup = Setup;
va->get = Lock; va->get = Lock;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment