Skip to content

Commit

Permalink
For libavcodec versions older than 56.5.100 use delay instead of init…
Browse files Browse the repository at this point in the history
…ial_padding when setting up audio stream
  • Loading branch information
0xFelix committed Oct 13, 2017
1 parent 24c8dfb commit be777a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AVMuxer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,11 @@ bool AVMuxer::Private::prepareStreams()
c->bits_per_raw_sample = aenc->audioFormat().bytesPerSample()*8; // need??

AVCodecContext *avctx = (AVCodecContext *) aenc->codecContext();
#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(56,5,100)
c->initial_padding = avctx->initial_padding;
#else
c->delay = avctx->delay;
#endif
if (avctx->extradata_size) {
c->extradata = avctx->extradata;
c->extradata_size = avctx->extradata_size;
Expand Down

0 comments on commit be777a8

Please sign in to comment.