[Ffmpeg-devel] Patch to add header info to flv format

Michael Niedermayer michaelni
Fri Jul 14 21:22:34 CEST 2006


On Fri, Jul 14, 2006 at 06:02:25PM +0200, Philipp Klaus wrote:
> Hello list,
> here's the new corrected patch (no tabs anymore :-) against a svn 
> checkout of today. I also included code to react if -ss and/or -t are 
> set. It's still not perfect but works for me and hopefully most other 
> people. I appreciate hints how to do that stuff better.


> +void put_amf_double(ByteIOContext *pb, double d)
> +{
> +    unsigned char *llp = (uint64_t *)&d;
> +    unsigned char nllp[8];
> +    int i;
> +    for (i = 0; i < 8; i++) {
> +        nllp[i] = llp[7-i];
> +    }
> +    put_byte(pb, AMF_DOUBLE);
> +    put_buffer(pb, nllp, 8);

as ive already said this code is not portable, it will not work on many
non x86 systems, use av_dbl2int() see ffm.c for example on how to use it!

> +    

trailing whitespace, is another thing which isnt allowed

i also think that the change should affect the regression test checksums
they should also be updated in the patch ...

about the duration hack in ffmpeg.c, i understand that you need it but its
no accpetable for svn, so i wont commit that part, but i will commit the
flvenc.c change if you fix the issues above

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list