[vlc-commits] vdpau: use avcodec context dimensions
Rémi Denis-Courmont
git at videolan.org
Sun Sep 27 21:57:46 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Sep 27 14:56:03 2015 +0300| [e8d10e59c55e5d90e0c6725ea1654effde524ede] | committer: Rémi Denis-Courmont
vdpau: use avcodec context dimensions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e8d10e59c55e5d90e0c6725ea1654effde524ede
---
modules/hw/vdpau/avcodec.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/modules/hw/vdpau/avcodec.c b/modules/hw/vdpau/avcodec.c
index 71c17dd..e175cb2 100644
--- a/modules/hw/vdpau/avcodec.c
+++ b/modules/hw/vdpau/avcodec.c
@@ -146,6 +146,7 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
if (pix_fmt != AV_PIX_FMT_VDPAU)
return VLC_EGENERIC;
+ (void) fmt;
(void) p_sys;
void *func;
VdpStatus err;
@@ -227,8 +228,6 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
if (av_vdpau_bind_context(avctx, sys->device, func, flags))
goto error;
-
- (void) fmt;
#else
AVVDPAUContext *hwctx = av_vdpau_alloc_context();
if (unlikely(hwctx == NULL))
@@ -257,10 +256,10 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
goto error;
}
msg_Dbg(va, "video surface limits: %"PRIu32"x%"PRIu32, w, h);
- if (w < fmt->video.i_width || h < fmt->video.i_height)
+ if (w < avctx->coded_width || h < avctx->coded_height)
{
- msg_Err(va, "video surface above limits: %ux%u",
- fmt->video.i_width, fmt->video.i_height);
+ msg_Err(va, "video surface above limits: %dx%d",
+ avctx->coded_width, avctx->coded_height);
goto error;
}
@@ -274,10 +273,10 @@ static int Open(vlc_va_t *va, AVCodecContext *avctx, enum PixelFormat pix_fmt,
}
msg_Dbg(va, "decoder profile limits: level %"PRIu32" mb %"PRIu32" "
"%"PRIu32"x%"PRIu32, l, mb, w, h);
- if ((int)l < level || w < fmt->video.i_width || h < fmt->video.i_height)
+ if ((int)l < level || w < avctx->coded_width || h < avctx->coded_height)
{
- msg_Err(va, "decoder profile above limits: level %d %ux%u",
- level, fmt->video.i_width, fmt->video.i_height);
+ msg_Err(va, "decoder profile above limits: level %d %dx%d",
+ level, avctx->coded_width, avctx->coded_height);
goto error;
}
More information about the vlc-commits
mailing list