Alexandre Ferrieux <[email protected]> added the comment:

OK after a digging a bit, I see put_flush_packet() is suitable.
Below is the trivial patch solving the issue:

Index: libavformat/wav.c
===================================================================
--- libavformat/wav.c   (revision 24356)
+++ libavformat/wav.c   (working copy)
@@ -117,7 +117,11 @@
             url_fseek(pb, file_size, SEEK_SET);
             put_flush_packet(pb);
         }
-    }
+    } else {
+         /* though we have a technically invalid WAV header and no
+                trailer, we still need to flush the last chunk of 
samples */
+         put_flush_packet(pb);
+       }
     return 0;
 }

----------
substatus: analyzed -> fixed

________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/issue498>
________________________________________________

Reply via email to