[Ffmpeg-devel] Asf patch

Michael Niedermayer michaelni
Sat Dec 16 02:29:36 CET 2006


Hi

On Sat, Dec 16, 2006 at 01:35:42AM +0200, Nikolay Dobrev wrote:
> 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 frame with zeroes. After that when the file is played there is
> errors from the decoder of some frames.
> 
> I suggest the attached patch
> 
> Nick.

> --- libavformat/asf-enc_old.c	2006-12-07 01:46:11.000000000 +0200
> +++ libavformat/asf-enc.c	2006-12-15 11:54:20.000000000 +0200
> @@ -540,7 +540,7 @@
>                                  unsigned int    sendtime,
>                                  unsigned int    duration,
>                                  int             nb_payloads,
> -                                int             padsize
> +                                int             *padsize
>              )
>  {
>      ASFContext *asf = s->priv_data;

i dont think that changing the argument here but not where the function
is called is going to work

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Breaking DRM is a little like attempting to break through a door even
though the window is wide open and the only thing in the house is a bunch
of things you dont want and which you would get tomorrow for free anyway




More information about the ffmpeg-devel mailing list