From: Paul Brossier Date: Mon, 10 Apr 2017 14:27:07 +0000 (+0200) Subject: src/io/source_avcodec.c: more fixes for declaration before assignment X-Git-Tag: 0.4.6~67 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=1a6f2debca7f8c15f5a7784c2d771334e47ab60a;p=aubio.git src/io/source_avcodec.c: more fixes for declaration before assignment --- diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index 60193e8d..0598260f 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -362,6 +362,9 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, uint_t * read_sam int out_samples = 0; #endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ smpl_t *output = s->output; +#ifndef FF_API_LAVF_AVCTX + int len = 0; +#endif av_init_packet (&avPacket); *read_samples = 0; @@ -403,7 +406,7 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, uint_t * read_sam } } #else - int len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, &avPacket); + len = avcodec_decode_audio4(avCodecCtx, avFrame, &got_frame, &avPacket); if (len < 0) { AUBIO_ERR("source_avcodec: error while decoding %s\n", s->path);