Ignore:
Timestamp:
Dec 11, 2016, 3:47:00 AM (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, yinfft+
Children:
dcde285
Parents:
22b0807
Message:

src/io/source_avcodec.c: add backward compatibility for libavcodec55

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    r22b0807 ra2d628b  
    3838#include <libavutil/opt.h>
    3939#include <stdlib.h>
     40
     41// backward compatibility with libavcodec55
     42#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
     43#warning "libavcodec55 is deprecated"
     44#define av_frame_alloc  avcodec_alloc_frame
     45#define av_frame_free avcodec_free_frame
     46#define av_packet_unref av_free_packet
     47#endif
    4048
    4149#include "aubio_priv.h"
     
    508516    s->avFormatCtx = NULL;
    509517  }
    510 #if FF_API_LAVF_AVCTX
    511518  av_packet_unref(&s->avPacket);
    512 #else
    513   av_free_packet(&s->avPacket);
    514 #endif
    515519  return AUBIO_OK;
    516520}
Note: See TracChangeset for help on using the changeset viewer.