From: Paul Brossier Date: Sun, 23 Dec 2018 02:56:38 +0000 (+0100) Subject: [source_avcodec] clean up unused statements and previously included stdlib X-Git-Tag: 0.4.9~17 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=724303ec0e581f6060c031c2271dc4552b4b958b;p=aubio.git [source_avcodec] clean up unused statements and previously included stdlib --- diff --git a/src/io/source_avcodec.c b/src/io/source_avcodec.c index 98b468eb..257e30ff 100644 --- a/src/io/source_avcodec.c +++ b/src/io/source_avcodec.c @@ -30,7 +30,6 @@ #include #endif #include -#include // determine whether we use libavformat from ffmpeg or from libav #define FFMPEG_LIBAVFORMAT (LIBAVFORMAT_VERSION_MICRO > 99 ) @@ -120,9 +119,9 @@ uint_t aubio_source_avcodec_has_network_url(aubio_source_avcodec_t *s) { aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, uint_t samplerate, uint_t hop_size) { aubio_source_avcodec_t * s = AUBIO_NEW(aubio_source_avcodec_t); - AVFormatContext *avFormatCtx = s->avFormatCtx; - AVCodecContext *avCodecCtx = s->avCodecCtx; - AVFrame *avFrame = s->avFrame; + AVFormatContext *avFormatCtx = NULL; + AVCodecContext *avCodecCtx = NULL; + AVFrame *avFrame = NULL; sint_t selected_stream = -1; #if FF_API_LAVF_AVCTX AVCodecParameters *codecpar; @@ -473,14 +472,6 @@ void aubio_source_avcodec_readframe(aubio_source_avcodec_t *s, *read_samples = out_samples; beach: - s->avFormatCtx = avFormatCtx; - s->avCodecCtx = avCodecCtx; - s->avFrame = avFrame; -#if defined(HAVE_AVRESAMPLE) || defined(HAVE_SWRESAMPLE) - s->avr = avr; -#endif /* HAVE_AVRESAMPLE || HAVE_SWRESAMPLE */ - s->output = output; - av_packet_unref(&avPacket); }