#include <libavresample/avresample.h>
#endif
#include <libavutil/opt.h>
-#include <stdlib.h>
// determine whether we use libavformat from ffmpeg or from libav
#define FFMPEG_LIBAVFORMAT (LIBAVFORMAT_VERSION_MICRO > 99 )
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;
*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);
}