]> git.sesse.net Git - ffmpeg/commitdiff
lavc/vdpau_vp9: Do not mix declarations and code.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Mon, 6 Jan 2020 21:57:54 +0000 (22:57 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Mon, 6 Jan 2020 21:57:54 +0000 (22:57 +0100)
Fixes the following gcc warning:
libavcodec/vdpau_vp9.c:45:5: warning: ISO C90 forbids mixed declarations and code

libavcodec/vdpau_vp9.c

index f1ee4ac5e015c8beb5e0b2406aa4a17eed4a8dbd..54e060fad5d38d94c00a3d1b9b82acbe115f994e 100644 (file)
@@ -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;