sierravmd: fix audio pts
authorJustin Ruggles <justin.ruggles@gmail.com>
Tue, 10 Jan 2012 14:24:21 +0000 (09:24 -0500)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 10 Jan 2012 19:24:08 +0000 (14:24 -0500)
The duration of the first packet was being calculated incorrectly, leading to
an incorrect timestamp offset.

libavformat/sierravmd.c

index 1b5f04b..81ff46f 100644 (file)
@@ -206,7 +206,7 @@ static int vmd_read_header(AVFormatContext *s,
                 vmd->frame_table[total_frames].pts = current_audio_pts;
                 total_frames++;
                 if(!current_audio_pts)
                 vmd->frame_table[total_frames].pts = current_audio_pts;
                 total_frames++;
                 if(!current_audio_pts)
-                    current_audio_pts += sound_buffers;
+                    current_audio_pts += sound_buffers - 1;
                 else
                     current_audio_pts++;
                 break;
                 else
                     current_audio_pts++;
                 break;