Changeset 53bc55c


Ignore:
Timestamp:
Dec 27, 2023, 6:58:55 PM (12 months ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
master
Children:
8e9d3a3
Parents:
0b947f9
Message:

[source_avcodec] adjust detection of AVChannelLayout (> ffmpeg 5.0)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    r0b947f9 r53bc55c  
    5353#endif
    5454
     55#if LIBAVUTIL_VERSION_INT < AV_VERSION_INT(57,28,100)
     56#warning "libavutil < 57.28.100 is deprecated"
     57#else
     58#define LIBAVUTIL_HAS_CH_LAYOUT
     59#endif
     60
    5561#include "aubio_priv.h"
    5662#include "fvec.h"
     
    264270  /* get input specs */
    265271  s->input_samplerate = avCodecCtx->sample_rate;
    266 #ifdef AVUTIL_CHANNEL_LAYOUT_H
     272#ifdef LIBAVUTIL_HAS_CH_LAYOUT
    267273  s->input_channels   = avCodecCtx->ch_layout.nb_channels;
    268274#else
     
    334340    int err;
    335341    SwrContext *avr = swr_alloc();
    336 #ifdef AVUTIL_CHANNEL_LAYOUT_H
     342#ifdef LIBAVUTIL_HAS_CH_LAYOUT
    337343    AVChannelLayout input_layout;
    338344    AVChannelLayout output_layout;
     
    385391  int got_frame = 0;
    386392  int in_samples = avFrame->nb_samples;
    387 #ifdef AVUTIL_CHANNEL_LAYOUT_H
     393#ifdef LIBAVUTIL_HAS_CH_LAYOUT
    388394  int max_out_samples = AUBIO_AVCODEC_MAX_BUFFER_SIZE / avCodecCtx->ch_layout.nb_channels;
    389395#else
     
    457463
    458464#if LIBAVUTIL_VERSION_MAJOR > 52
    459 #ifdef AVUTIL_CHANNEL_LAYOUT_H
     465#ifdef LIBAVUTIL_HAS_CH_LAYOUT
    460466  int frame_channels = avFrame->ch_layout.nb_channels;
    461467#else
Note: See TracChangeset for help on using the changeset viewer.