Commit a665a2ec authored by Carl Eugen Hoyos's avatar Carl Eugen Hoyos

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
parent 96fab29e
...@@ -35,16 +35,15 @@ static int vdpau_vp9_start_frame(AVCodecContext *avctx, ...@@ -35,16 +35,15 @@ static int vdpau_vp9_start_frame(AVCodecContext *avctx,
{ {
VP9Context *s = avctx->priv_data; VP9Context *s = avctx->priv_data;
VP9SharedContext *h = &(s->s); 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]; VP9Frame pic = h->frames[CUR_FRAME];
struct vdpau_picture_context *pic_ctx = pic.hwaccel_picture_private; struct vdpau_picture_context *pic_ctx = pic.hwaccel_picture_private;
int i; int i;
VdpPictureInfoVP9 *info = &pic_ctx->info.vp9; 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->width = avctx->width;
info->height = avctx->height; info->height = avctx->height;
......
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