[FFmpeg-cvslog] avformat/g729dec: set packet duration and correctly set timebase info

Paul B Mahol git at videolan.org
Fri Sep 27 13:45:08 EEST 2019


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Sep 27 12:38:23 2019 +0200| [35a12d2071efa5c408e6dd4a4a6d0cf930fb3eb3] | committer: Paul B Mahol

avformat/g729dec: set packet duration and correctly set timebase info

Fixes #6704.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=35a12d2071efa5c408e6dd4a4a6d0cf930fb3eb3
---

 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;
 }



More information about the ffmpeg-cvslog mailing list