[FFmpeg-devel] [PATCH] flv duration

Michael Niedermayer michaelni
Sun Apr 11 02:16:21 CEST 2010


On Sat, Apr 10, 2010 at 04:29:47PM -0700, Howard Chu wrote:
> Michael Niedermayer wrote:
>> On Sat, Apr 10, 2010 at 09:19:41AM -0700, Howard Chu wrote:
>>> Index: libavformat/flvdec.c
>>> ===================================================================
>>> --- libavformat/flvdec.c	(revision 22813)
>>> +++ libavformat/flvdec.c	(working copy)
>>> @@ -192,9 +192,11 @@
>>>           } else if(amf_type == AMF_DATA_TYPE_NUMBER) {
>>>               snprintf(str_val, sizeof(str_val), "%.f", num_val);
>>>               av_metadata_set(&s->metadata, key, str_val);
>>> -            if(!strcmp(key, "duration")) s->duration = num_val * 
>>> AV_TIME_BASE;
>>> +            if(!strcmp(key, "duration")) s->streams[0]->duration = 
>>> num_val * 1000;
>>>               else if(!strcmp(key, "videodatarate")&&  vcodec&&  0<= 
>>> (int)(num_val * 1024.0))
>>
>> not ok
>>
>>
>>>                   vcodec->bit_rate = num_val * 1024.0;
>>> +            else if(!strcmp(key, "audiodatarate")&&  acodec&&  0<= 
>>> (int)(num_val * 1024.0))
>>> +                acodec->bit_rate = num_val * 1024.0;
>>>           } else if (amf_type == AMF_DATA_TYPE_STRING)
>>
>> ok
>
> OK, just the audio rate.
>
> -- 
>   -- Howard Chu
>   CTO, Symas Corp.           http://www.symas.com
>   Director, Highland Sun     http://highlandsun.com/hyc/
>   Chief Architect, OpenLDAP  http://www.openldap.org/project/

> Index: libavformat/flvdec.c
> ===================================================================
> --- libavformat/flvdec.c	(revision 22813)
> +++ libavformat/flvdec.c	(working copy)
> @@ -195,6 +195,8 @@

ok

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100411/32795762/attachment.pgp>



More information about the ffmpeg-devel mailing list