Commit 2c611eda authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

avcodec: fix obvious variable shadowing

parent 3373c89c
......@@ -1494,13 +1494,12 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
decoder_t *p_dec = p_context->opaque;
decoder_sys_t *p_sys = p_dec->p_sys;
video_format_t fmt;
size_t i;
/* Enumerate available formats */
enum PixelFormat swfmt = avcodec_default_get_format(p_context, pi_fmt);
bool can_hwaccel = false;
for( i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++ )
for (size_t i = 0; pi_fmt[i] != AV_PIX_FMT_NONE; i++)
{
const AVPixFmtDescriptor *dsc = av_pix_fmt_desc_get(pi_fmt[i]);
if (dsc == NULL)
......@@ -1513,8 +1512,10 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
can_hwaccel = true;
}
#if defined(_WIN32) && LIBAVUTIL_VERSION_CHECK(54, 13, 1, 24, 100)
enum PixelFormat p_fmts[i+1];
if (i > 1 && pi_fmt[0] == AV_PIX_FMT_DXVA2_VLD && pi_fmt[1] == AV_PIX_FMT_D3D11VA_VLD)
size_t count;
for (count = 0; pi_fmt[count] != AV_PIX_FMT_NONE; count++);
enum PixelFormat p_fmts[count + 1];
if (pi_fmt[0] == AV_PIX_FMT_DXVA2_VLD && pi_fmt[1] == AV_PIX_FMT_D3D11VA_VLD)
{
/* favor D3D11VA over DXVA2 as the order will decide which vout will be
* used */
......
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