100l(audio sync) fix by (Wolfram Gloger <wmglo at dent dot med dot uni-muenchen dot...
[ffmpeg.git] / ffmpeg.c
index 2222a5f..fc8169e 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -442,7 +442,7 @@ static void do_audio_out(AVFormatContext *s,
         if(fabs(delta) > 50){
             if(ist->is_start){
                 if(byte_delta < 0){
-                    byte_delta= FFMIN(byte_delta, size);
+                    byte_delta= FFMAX(byte_delta, -size);
                     size += byte_delta;
                     buf  -= byte_delta;
                     if(verbose > 2)