diff options
author | Anton Khirnov <anton@khirnov.net> | 2014-08-23 13:12:51 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2014-10-13 19:10:30 +0000 |
commit | eabdc2a830f1ab1a3f12243eb7e2fba801cb81f0 (patch) | |
tree | a4a82d8448b92bf27f0a73d970e22c905a8e685d /libavformat/oggenc.c | |
parent | 2df0c32ea12ddfa72ba88309812bfb13b674130f (diff) | |
download | ffmpeg-eabdc2a830f1ab1a3f12243eb7e2fba801cb81f0.tar.gz |
lavf: use initial_padding instead of deprecated delay
Diffstat (limited to 'libavformat/oggenc.c')
-rw-r--r-- | libavformat/oggenc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/oggenc.c b/libavformat/oggenc.c index 489f0105c6..1277a8b123 100644 --- a/libavformat/oggenc.c +++ b/libavformat/oggenc.c @@ -564,7 +564,10 @@ static int ogg_write_packet_internal(AVFormatContext *s, AVPacket *pkt) } granule = (oggstream->last_kf_pts<<oggstream->kfgshift) | pframe_count; } else if (st->codec->codec_id == AV_CODEC_ID_OPUS) - granule = pkt->pts + pkt->duration + av_rescale_q(st->codec->delay, (AVRational){ 1, st->codec->sample_rate }, st->time_base); + granule = pkt->pts + pkt->duration + + av_rescale_q(st->codec->initial_padding, + (AVRational){ 1, st->codec->sample_rate }, + st->time_base); else granule = pkt->pts + pkt->duration; |