[vlc-commits] [Git][videolan/vlc][master] 2 commits: avcodec: video: fix unused parameter warning
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Aug 6 11:07:29 UTC 2024
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
7bb664de by Alexandre Janniaux at 2024-08-06T10:53:23+00:00
avcodec: video: fix unused parameter warning
../../modules/codec/avcodec/video.c:171:59: warning: unused parameter 'p_sys' [-Wunused-parameter]
static struct frame_info_s * FrameInfoGet( decoder_sys_t *p_sys, AVFrame *frame )
^
- - - - -
231c0948 by Alexandre Janniaux at 2024-08-06T10:53:23+00:00
avcodec: va: fixed unused parameter warning
The parameter is not used since
270a9e1d1a39161a599b92871b0fdcf1e122e31b.
../../modules/codec/avcodec/va.c:33:70: warning: unused parameter 'swfmt' [-Wunused-parameter]
bool vlc_va_MightDecode(enum AVPixelFormat hwfmt, enum AVPixelFormat swfmt)
^
- - - - -
3 changed files:
- modules/codec/avcodec/va.c
- modules/codec/avcodec/va.h
- modules/codec/avcodec/video.c
Changes:
=====================================
modules/codec/avcodec/va.c
=====================================
@@ -30,7 +30,7 @@
#include <libavcodec/avcodec.h>
#include "va.h"
-bool vlc_va_MightDecode(enum AVPixelFormat hwfmt, enum AVPixelFormat swfmt)
+bool vlc_va_MightDecode(enum AVPixelFormat hwfmt)
{
switch (hwfmt)
{
=====================================
modules/codec/avcodec/va.h
=====================================
@@ -57,12 +57,11 @@ typedef int (*vlc_va_open)(vlc_va_t *, AVCodecContext *,
/**
* Determines whether the hardware acceleration PixelFormat can be used to
- * decode pixels similar to the software PixelFormat.
+ * decode pixels.
* @param hwfmt the hardware acceleration pixel format
- * @param swfmt the software pixel format
* @return true if the hardware acceleration should be supported
*/
-bool vlc_va_MightDecode(enum AVPixelFormat hwfmt, enum AVPixelFormat swfmt);
+bool vlc_va_MightDecode(enum AVPixelFormat hwfmt);
/**
* Creates an accelerated video decoding back-end for libavcodec.
=====================================
modules/codec/avcodec/video.c
=====================================
@@ -171,6 +171,7 @@ static void FrameInfoInit( decoder_sys_t *p_sys )
static struct frame_info_s * FrameInfoGet( decoder_sys_t *p_sys, AVFrame *frame )
{
#if OPAQUE_REF_ONLY
+ (void)p_sys;
/* There's no pkt to frame opaque mapping guarantee */
return (struct frame_info_s *) frame->opaque_ref->data;
#else
@@ -721,7 +722,7 @@ static int ffmpeg_OpenVa(decoder_t *p_dec, AVCodecContext *p_context,
if( hwfmt == AV_PIX_FMT_NONE )
return VLC_EGENERIC;
- if (!vlc_va_MightDecode(hwfmt, swfmt))
+ if (!vlc_va_MightDecode(hwfmt))
return VLC_EGENERIC; /* Unknown brand of hardware acceleration */
if (p_context->width == 0 || p_context->height == 0)
{ /* should never happen */
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/101dd0f44148cb871ec61d00b3883a37b3500550...231c0948eeed4bba1cee4d2cc34e5e5813c26efb
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/101dd0f44148cb871ec61d00b3883a37b3500550...231c0948eeed4bba1cee4d2cc34e5e5813c26efb
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list