ref: 1a6f2debca7f8c15f5a7784c2d771334e47ab60a
parent: b6788589e03ac1beaa58d0fa75e7d0c9cb7d3e61
author: Paul Brossier <piem@piem.org>
date: Mon Apr 10 12:27:07 EDT 2017
src/io/source_avcodec.c: more fixes for declaration before assignment
--- a/src/io/source_avcodec.c
+++ b/src/io/source_avcodec.c
@@ -362,6 +362,9 @@
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 @@
}
}
#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);