Changeset 50f39f5


Ignore:
Timestamp:
Apr 10, 2017, 2:35:19 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler
Children:
de23e58
Parents:
6d8a6403
Message:

src/io/source_avcodec.c: fix for windows vc9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    r6d8a6403 r50f39f5  
    110110aubio_source_avcodec_t * new_aubio_source_avcodec(const char_t * path, uint_t samplerate, uint_t hop_size) {
    111111  aubio_source_avcodec_t * s = AUBIO_NEW(aubio_source_avcodec_t);
     112  AVFormatContext *avFormatCtx = s->avFormatCtx;
     113  AVCodecContext *avCodecCtx = s->avCodecCtx;
     114  AVCodec *codec;
     115  AVFrame *avFrame = s->avFrame;
     116  uint_t i;
     117  sint_t selected_stream = -1;
    112118  int err;
    113119  if (path == NULL) {
     
    139145
    140146  // try opening the file and get some info about it
    141   AVFormatContext *avFormatCtx = s->avFormatCtx;
    142147  avFormatCtx = NULL;
    143148  if ( (err = avformat_open_input(&avFormatCtx, s->path, NULL, NULL) ) < 0 ) {
     
    168173
    169174  // look for the first audio stream
    170   uint_t i;
    171   sint_t selected_stream = -1;
    172175  for (i = 0; i < avFormatCtx->nb_streams; i++) {
    173176#if FF_API_LAVF_AVCTX
     
    191194  s->selected_stream = selected_stream;
    192195
    193   AVCodecContext *avCodecCtx = s->avCodecCtx;
    194196#if FF_API_LAVF_AVCTX
    195197  AVCodecParameters *codecpar = avFormatCtx->streams[selected_stream]->codecpar;
     
    198200    goto beach;
    199201  }
    200   AVCodec *codec = avcodec_find_decoder(codecpar->codec_id);
     202  codec = avcodec_find_decoder(codecpar->codec_id);
    201203
    202204  /* Allocate a codec context for the decoder */
     
    249251  }
    250252
    251   AVFrame *avFrame = s->avFrame;
    252253  avFrame = av_frame_alloc();
    253254  if (!avFrame) {
Note: See TracChangeset for help on using the changeset viewer.