From 5bd9a2b2931e1ed830d63a3a49b128abff36d8d4 Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 10 Apr 2017 15:16:44 +0200 Subject: [PATCH] src/io/source_avcodec.c: more fixes for declaration before assignment --- src/io/source_avcodec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index 3733803a..a440bead 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -111,13 +111,13 @@ aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, uint_t sa aubio_source_avcodec_t * s = AUBIO_NEW(aubio_source_avcodec_t); AVFormatContext *avFormatCtx = s->avFormatCtx; AVCodecContext *avCodecCtx = s->avCodecCtx; - AVCodec *codec; AVFrame *avFrame = s->avFrame; + sint_t selected_stream = -1; #if FF_API_LAVF_AVCTX AVCodecParameters *codecpar; #endif + AVCodec *codec; uint_t i; - sint_t selected_stream = -1; int err; if (path == NULL) { AUBIO_ERR("source_avcodec: Aborted opening null path\n"); @@ -343,13 +343,13 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, uint_t * read_sam AVCodecContext *avCodecCtx = s->avCodecCtx; AVFrame *avFrame = s->avFrame; AVPacket avPacket = s->avPacket; - av_init_packet (&avPacket); #ifdef HAVE_AVRESAMPLE AVAudioResampleContext *avr = s->avr; #elif defined(HAVE_SWRESAMPLE) SwrContext *avr = s->avr; #endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ smpl_t *output = s->output; + av_init_packet (&avPacket); *read_samples = 0; do -- 2.11.0