[FFmpeg-devel] [PATCH] fix for wav_write_trailer

Justin Ruggles justinruggles
Sun May 4 17:36:03 CEST 2008


There is a slight problem with the wav muxer.  When the output is
streamed, url_is_streamed() does not always report it as such.  The only
reliable way I've found is to try to perform a seek to a different
position and check for an error.

ffmpeg -i test.wav -f wav -y /dev/stdout | hexdump -C /dev/stdin > out.txt
tail -5 out.txt:
033fa800  27 06 5e 09 0d 07 50 07  b3 06 fa 04 ae 04 e0 02
033fa810  23 01 ed 01 cf fc 2b 02  76 f8 74 03 98 f4 77 05
033fa820  ce f1 62 07 63 f0 fe 08  7b f0 ac 09 00 a8 3f 03
033fa830  28 a8 3f 03

Notice that the last 8 bytes are the data size and the file size (as
indicated by the file positions in the left column), which should have
been written in the header, not at the end of the file.

I have attached a patch which works, but I really don't know if it's the
proper solution.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: wav_write_trailer.patch
Type: text/x-diff
Size: 1595 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080504/26772357/attachment.patch>

More information about the ffmpeg-devel mailing list