From 35a12d2071efa5c408e6dd4a4a6d0cf930fb3eb3 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Fri, 27 Sep 2019 12:38:23 +0200 Subject: [PATCH] avformat/g729dec: set packet duration and correctly set timebase info Fixes #6704. --- libavformat/g729dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/g729dec.c b/libavformat/g729dec.c index 7b67fc488c..c58855cb99 100644 --- a/libavformat/g729dec.c +++ b/libavformat/g729dec.c @@ -61,8 +61,7 @@ static int g729_read_header(AVFormatContext *s) return AVERROR(EINVAL); } - avpriv_set_pts_info(st, st->codecpar->block_align << 3, 1, - st->codecpar->sample_rate); + avpriv_set_pts_info(st, 64, 80, st->codecpar->sample_rate); return 0; } @@ -76,6 +75,7 @@ static int g729_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->stream_index = 0; pkt->dts = pkt->pts = pkt->pos / st->codecpar->block_align; + pkt->duration = 1; return 0; }