Changeset 261836d for src


Ignore:
Timestamp:
Nov 30, 2016, 5:18:14 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, yinfft+
Children:
8a49bb9
Parents:
41ebc91
Message:

src/io/source_avcodec.c: keep a reference to packet to remove it when closing file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/io/source_avcodec.c

    r41ebc91 r261836d  
    6060  AVCodecContext *avCodecCtx;
    6161  AVFrame *avFrame;
     62  AVPacket avPacket;
    6263  AVAudioResampleContext *avr;
    6364  smpl_t *output;
     
    306307  AVCodecContext *avCodecCtx = s->avCodecCtx;
    307308  AVFrame *avFrame = s->avFrame;
    308   AVPacket avPacket;
     309  AVPacket avPacket = s->avPacket;
    309310  av_init_packet (&avPacket);
    310311  AVAudioResampleContext *avr = s->avr;
     
    507508    s->avFormatCtx = NULL;
    508509  }
     510#if FF_API_LAVF_AVCTX
     511  av_packet_unref(&s->avPacket);
     512#else
     513  av_free_packet(&s->avPacket);
     514#endif
    509515  return AUBIO_OK;
    510516}
Note: See TracChangeset for help on using the changeset viewer.