[libav-commits] ipmovie: fix pts for CODEC_ID_INTERPLAY_DPCM

Justin Ruggles git at libav.org
Tue Jan 10 20:25:27 CET 2012


Module: libav
Branch: master
Commit: 4556ebfb7d13f08eb8f794ac4fdfc04c89c46ece

Author:    Justin Ruggles <justin.ruggles at gmail.com>
Committer: Justin Ruggles <justin.ruggles at gmail.com>
Date:      Tue Jan 10 08:48:23 2012 -0500

ipmovie: fix pts for CODEC_ID_INTERPLAY_DPCM

frame sample count calculation was incorrect

---

 libavformat/ipmovie.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index b91196b..daa44b1 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -144,7 +144,7 @@ static int load_ipmovie_packet(IPMVEContext *s, AVIOContext *pb,
             (s->audio_chunk_size / s->audio_channels / (s->audio_bits / 8));
         else
             s->audio_frame_count +=
-                (s->audio_chunk_size - 6) / s->audio_channels;
+                (s->audio_chunk_size - 6 - s->audio_channels) / s->audio_channels;
 
         av_dlog(NULL, "sending audio frame with pts %"PRId64" (%d audio frames)\n",
                 pkt->pts, s->audio_frame_count);



More information about the libav-commits mailing list