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

Philipp Klaus ffmpegdevel
Mon Jul 17 12:14:24 CEST 2006


>> +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!

I changed that to the av_dbl2int() version.

> [...]
>> +    
> trailing whitespace, is another thing which isnt allowed

I removed them. Hope it's OK now.

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

I have done that. With these values the regression tests succeed on my 

> 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

I've done that. Thank you for committing.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg_flvheader.patch
Type: text/x-patch
Size: 7269 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060717/546ceb57/attachment.bin>

More information about the ffmpeg-devel mailing list