[FFmpeg-devel] [PATCH] flv duration
Howard Chu
hyc
Sun Apr 11 01:29:47 CEST 2010
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/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dif.txt
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100410/b5a17ac9/attachment.txt>
More information about the ffmpeg-devel
mailing list