From 1a6f2debca7f8c15f5a7784c2d771334e47ab60a Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 10 Apr 2017 16:27:07 +0200 Subject: [PATCH] src/io/source_avcodec.c: more fixes for declaration before assignment --- src/io/source_avcodec.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.11.0