[Ffmpeg-devel] [PATCH] asf-enc brokes packets with padding

Nikolay Dobrev dobrev666
Tue Dec 19 12:25:45 CET 2006


Hello,
Encoding of asf packets with padding is broken.
When asf->packet_size_left is not zero, one or two more bytes is added to
the parsing info and the asf->packet_size_left is not updated. Then the
packet_filled_size in function

static void flush_packet(AVFormatContext *s)

is wrong and the memset:

memset(asf->packet_buf + packet_filled_size, 0, asf->packet_size_left);

fills the end of the frame with zeroes. After that when the file is played
there is errors from the decoder of these frames.

I suggest the attached patch.

Nick.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asf-enc.patch
Type: application/octet-stream
Size: 1374 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20061219/51cb753f/attachment.obj>



More information about the ffmpeg-devel mailing list