Commit 3f50af6a authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont
Browse files

va: remove unused error return code

parent 8b221d3b
......@@ -144,13 +144,11 @@ static void SetupAVCodecContext(vlc_va_t *);
static picture_t *DxAllocPicture(vlc_va_t *, const video_format_t *, unsigned index);
/* */
static int Setup(vlc_va_t *va, vlc_fourcc_t *chroma)
static void Setup(vlc_va_t *va, vlc_fourcc_t *chroma)
{
vlc_va_sys_t *sys = va->sys;
*chroma = sys->filter == NULL ? VLC_CODEC_D3D11_OPAQUE : VLC_CODEC_YV12;
return VLC_SUCCESS;
}
void SetupAVCodecContext(vlc_va_t *va)
......
......@@ -204,13 +204,11 @@ static filter_t *CreateFilter( vlc_object_t *p_this, const es_format_t *p_fmt_in
}
/* */
static int Setup(vlc_va_t *va, vlc_fourcc_t *chroma)
static void Setup(vlc_va_t *va, vlc_fourcc_t *chroma)
{
vlc_va_sys_t *sys = va->sys;
*chroma = sys->filter == NULL ? VLC_CODEC_D3D9_OPAQUE : VLC_CODEC_YV12;
return VLC_SUCCESS;
}
void SetupAVCodecContext(vlc_va_t *va)
......
......@@ -36,7 +36,7 @@ struct vlc_va_t {
module_t *module;
const char *description;
int (*setup)(vlc_va_t *, vlc_fourcc_t *output);
void (*setup)(vlc_va_t *, vlc_fourcc_t *output);
int (*get)(vlc_va_t *, picture_t *pic, uint8_t **data);
void (*release)(void *pic, uint8_t *surface);
int (*extract)(vlc_va_t *, picture_t *pic, uint8_t *data);
......@@ -64,11 +64,10 @@ vlc_va_t *vlc_va_New(vlc_object_t *obj, AVCodecContext *,
/**
* Initializes the acceleration video decoding back-end for libavcodec.
* @param output pointer to video chroma output by the back-end [OUT]
* @return VLC_SUCCESS on success, otherwise an error code.
*/
static inline int vlc_va_Setup(vlc_va_t *va, vlc_fourcc_t *output)
static inline void vlc_va_Setup(vlc_va_t *va, vlc_fourcc_t *output)
{
return va->setup(va, avctx, output);
va->setup(va, output);
}
/**
......
......@@ -187,10 +187,9 @@ static void Release( void *opaque, uint8_t *data )
(void) data;
}
static int Setup( vlc_va_t *va, vlc_fourcc_t *pi_chroma )
static void Setup( vlc_va_t *va, vlc_fourcc_t *pi_chroma )
{
*pi_chroma = VLC_CODEC_YV12;
return VLC_SUCCESS;
}
static void Delete( vlc_va_t *va, AVCodecContext *avctx )
......
......@@ -48,7 +48,7 @@
static int Open( vlc_va_t *, AVCodecContext *, enum PixelFormat,
const es_format_t *, picture_sys_t * );
static void Close( vlc_va_t * , AVCodecContext *);
static int Setup( vlc_va_t *, vlc_fourcc_t *);
static void Setup( vlc_va_t *, vlc_fourcc_t *);
static int Get( vlc_va_t *, picture_t *, uint8_t ** );
static int Extract( vlc_va_t *, picture_t *, uint8_t * );
static void Release( void *opaque, uint8_t *data );
......@@ -174,11 +174,9 @@ static void Close( vlc_va_t *va, AVCodecContext *avctx )
(void) va;
}
static int Setup( vlc_va_t *va, vlc_fourcc_t *pi_chroma )
static void Setup( vlc_va_t *va, vlc_fourcc_t *pi_chroma )
{
*pi_chroma = VLC_CODEC_I420;
return VLC_SUCCESS;
}
// Never called
......
......@@ -1134,13 +1134,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
if (va == NULL)
continue; /* Unsupported codec profile or such */
if (vlc_va_Setup(va, &p_dec->fmt_out.video.i_chroma))
{
msg_Err( p_dec, "acceleration setup failure" );
vlc_va_Delete(va, p_context);
continue;
}
vlc_va_Setup(va, &p_dec->fmt_out.video.i_chroma);
post_mt(p_sys);
if (va->description != NULL)
......
......@@ -140,7 +140,7 @@ static int Copy(vlc_va_t *va, picture_t *pic, uint8_t *data)
return VLC_SUCCESS;
}
static int Setup(vlc_va_t *va, vlc_fourcc_t *chromap)
static void Setup(vlc_va_t *va, vlc_fourcc_t *chromap)
{
vlc_va_sys_t *sys = va->sys;
......@@ -158,8 +158,6 @@ static int Setup(vlc_va_t *va, vlc_fourcc_t *chromap)
default:
vlc_assert_unreachable();
}
return VLC_SUCCESS;
}
static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
......
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