Ignore:
Timestamp:
May 3, 2016, 7:18:34 PM (9 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, pitchshift, sampler, timestretch, yinfft+
Children:
9ac77ac
Parents:
23982aa
Message:

src/io/source_avcodec.c: check if we still need max_analyze_duration2 (closes #53, thanks to @anthonylauzon)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    r23982aa ra9c33a2  
    2424#ifdef HAVE_LIBAV
    2525
    26 // determine whether we use libavformat from ffmpe or libav
    27 #define FFMPEG_LIBAVFORMAT (LIBAVFORMAT_VERSION_MICRO > 99)
     26// determine whether we use libavformat from ffmpeg or from libav
     27#define FFMPEG_LIBAVFORMAT (LIBAVFORMAT_VERSION_MICRO > 99 )
     28// max_analyze_duration2 was used from ffmpeg libavformat 55.43.100 through 57.2.100
     29#define FFMPEG_LIBAVFORMAT_MAX_DUR2 FFMPEG_LIBAVFORMAT && defined( \
     30      (LIBAVFORMAT_VERSION_MAJOR == 55 && LIBAVFORMAT_VERSION_MINOR >= 43) \
     31      || (LIBAVFORMAT_VERSION_MAJOR == 56) \
     32      || (LIBAVFORMAT_VERSION_MAJOR == 57 && LIBAVFORMAT_VERSION_MINOR < 2) \
     33      )
    2834
    2935#include <libavcodec/avcodec.h>
     
    107113
    108114  // try to make sure max_analyze_duration is big enough for most songs
    109 #if FFMPEG_LIBAVFORMAT
     115#if FFMPEG_LIBAVFORMAT_MAX_DUR2
    110116  avFormatCtx->max_analyze_duration2 *= 100;
    111117#else
     
    303309  s->output = output;
    304310
    305   av_free_packet(&avPacket);
     311  av_packet_unref(&avPacket);
    306312}
    307313
Note: See TracChangeset for help on using the changeset viewer.