Here's a patch to fix the audio sync of the result of a 'avicat' join.
The problem was a sloppy rounding in the calculation of the number
of audio bytes to write.

1. put the patch below in a file 'avicat.patch'
2. untar avifile 0.7.14
3. cd source directory
4. patch <avicat.patch -p1

It works for me and I hope it works for you too. ;-)

Regards,

Eric Schmeddes

----------------8<----------------------------8<-------------------------------

diff -Naur bad/samples/misc/avicat.cpp fix/samples/misc/avicat.cpp
--- bad/samples/misc/avicat.cpp Mon Jul 29 08:14:45 2002
+++ fix/samples/misc/avicat.cpp Mon Aug 12 17:09:38 2002
@@ -286,8 +286,8 @@
 
        if (!inAudStr->Eof())
        {
-           int64_t excess = (int64_t(bpf)*(written_frames+1) - written_audio);
-           int64_t to_read = int64_t(bpf)*(max_frame - frame);
+           int64_t excess = int64_t(bpf*(written_frames+1) - written_audio);
+           int64_t to_read = int64_t(bpf*(max_frame - frame));
 
            if (to_read > aud_buf_size)
                to_read = aud_buf_size;

----------------8<----------------------------8<-------------------------------

_______________________________________________
Avifile mailing list
[EMAIL PROTECTED]
http://prak.org/mailman/listinfo/avifile

Reply via email to