ipmovie: fix pts for CODEC_ID_INTERPLAY_DPCM
authorJustin Ruggles <justin.ruggles@gmail.com>
Tue, 10 Jan 2012 13:48:23 +0000 (08:48 -0500)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 10 Jan 2012 19:25:07 +0000 (14:25 -0500)
frame sample count calculation was incorrect

libavformat/ipmovie.c

index b91196b..daa44b1 100644 (file)
@@ -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);