[FFmpeg-cvslog] lavf/omadec: Fix packet duration for Atrac 3 lossless.

Carl Eugen Hoyos git at videolan.org
Sat Feb 11 20:01:54 EET 2017


ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Sat Feb 11 18:53:18 2017 +0100| [5b2c0eebeea9994d251765f92d37a20a902b1a02] | committer: Carl Eugen Hoyos

lavf/omadec: Fix packet duration for Atrac 3 lossless.

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

 libavformat/omadec.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/libavformat/omadec.c b/libavformat/omadec.c
index 321e77e..fa53636 100644
--- a/libavformat/omadec.c
+++ b/libavformat/omadec.c
@@ -374,8 +374,13 @@ static int aal_read_packet(AVFormatContext *s, AVPacket *pkt)
 
     pkt->stream_index = 0;
     pkt->pos = pos;
-    pkt->pts = pts * 2048LL;
-    pkt->duration = 2048;
+    if (s->streams[0]->codecpar->codec_id == AV_CODEC_ID_ATRAC3AL) {
+        pkt->duration = 1024;
+        pkt->pts = pts * 1024LL;
+    } else {
+        pkt->duration = 2048;
+        pkt->pts = pts * 2048LL;
+    }
 
     return ret;
 }



More information about the ffmpeg-cvslog mailing list