Changeset 8250214 for src


Ignore:
Timestamp:
Apr 7, 2017, 3:16:43 PM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler
Children:
f4dbf64b
Parents:
7a2666f
Message:

src/io/source_avcodec.c: avoid double free with libavformat56

Note: when using ffmpeg 3.2.x, valgrind will complain that `40 bytes in
1 blocks are still reachable`. This is supposedly harmless; for more
information see https://trac.ffmpeg.org/ticket/3194.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    r7a2666f r8250214  
    4343
    4444// backward compatibility with libavcodec55
     45#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,0,0)
     46#define HAVE_AUBIO_LIBAVCODEC_DEPRECATED 1
     47#endif
     48
    4549#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
    46 #warning "libavcodec55 is deprecated"
    47 #define HAVE_AUBIO_LIBAVCODEC_DEPRECATED 1
     50#warning "libavcodec < 56 is deprecated"
    4851#define av_frame_alloc  avcodec_alloc_frame
    4952#define av_frame_free avcodec_free_frame
     
    575578  if (s->avFormatCtx != NULL) {
    576579    avformat_close_input(&s->avFormatCtx);
    577 #ifndef HAVE_AUBIO_LIBAVCODEC_DEPRECATED // avoid crash on old libavcodec54
    578     avformat_free_context(s->avFormatCtx);
    579 #endif
    580580    s->avFormatCtx = NULL;
    581581  }
Note: See TracChangeset for help on using the changeset viewer.