[FFmpeg-devel] [PATCH] avformat/utils: Use delay if initial_padding is unavailable
Michael Niedermayer
michael at niedermayer.cc
Mon Jun 6 05:02:36 CEST 2016
It was used before codecpar
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavformat/utils.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/utils.c b/libavformat/utils.c
index ac056c4..97bfe87 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -3775,6 +3775,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
st->codecpar->width = orig_w;
st->codecpar->height = orig_h;
}
+ if (st->internal->avctx->codec_type == AVMEDIA_TYPE_AUDIO &&
+ st->internal->avctx->delay &&
+ !st->codecpar->initial_padding)
+ st->codecpar->initial_padding = st->internal->avctx->delay;
}
#if FF_API_LAVF_AVCTX
--
1.7.9.5
More information about the ffmpeg-devel
mailing list