aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2020-01-06 22:57:54 +0100
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2020-01-06 22:57:54 +0100
commita665a2ecda021012e5ec277ff16ca0014aa36b1d (patch)
treeda00f9e2b1c91dcde552fed24e07e8a527f48cc6
parent96fab29e9659c9492783f6369c5e14c0316bb94b (diff)
downloadffmpeg-a665a2ecda021012e5ec277ff16ca0014aa36b1d.tar.gz
lavc/vdpau_vp9: Do not mix declarations and code.
Fixes the following gcc warning: libavcodec/vdpau_vp9.c:45:5: warning: ISO C90 forbids mixed declarations and code
-rw-r--r--libavcodec/vdpau_vp9.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/libavcodec/vdpau_vp9.c b/libavcodec/vdpau_vp9.c
index f1ee4ac5e0..54e060fad5 100644
--- a/libavcodec/vdpau_vp9.c
+++ b/libavcodec/vdpau_vp9.c
@@ -35,16 +35,15 @@ static int vdpau_vp9_start_frame(AVCodecContext *avctx,
{
VP9Context *s = avctx->priv_data;
VP9SharedContext *h = &(s->s);
- const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(avctx->sw_pix_fmt);
- if (!pixdesc) {
- return AV_PIX_FMT_NONE;
- }
-
VP9Frame pic = h->frames[CUR_FRAME];
struct vdpau_picture_context *pic_ctx = pic.hwaccel_picture_private;
int i;
VdpPictureInfoVP9 *info = &pic_ctx->info.vp9;
+ const AVPixFmtDescriptor *pixdesc = av_pix_fmt_desc_get(avctx->sw_pix_fmt);
+ if (!pixdesc) {
+ return AV_PIX_FMT_NONE;
+ }
info->width = avctx->width;
info->height = avctx->height;