[FFmpeg-devel] [PATCH] Re: FLV1 codec; video bitrate not set

Michael Niedermayer michaelni
Fri Jan 30 17:15:50 CET 2009


On Wed, Jan 28, 2009 at 08:28:07PM +0100, Stefan de Konink wrote:
> Stefan de Konink wrote:
>> Stefan de Konink wrote:
>>> Stefan de Konink wrote:
>>>> Should I prepare a patch or is there more going on?
>>>
>>> A little bit more :) The first patch adds the right video bitrate to the 
>>> right location.
>> (I missed the if stuff)
>
> It is too early.

> Index: libavformat/flvdec.c
> ===================================================================
> --- libavformat/flvdec.c	(revision 16847)
> +++ libavformat/flvdec.c	(working copy)
> @@ -187,6 +187,8 @@
>              if(!strcmp(key, "duration")) s->duration = num_val * AV_TIME_BASE;
>  //            else if(!strcmp(key, "width")  && vcodec && num_val > 0) vcodec->width  = num_val;
>  //            else if(!strcmp(key, "height") && vcodec && num_val > 0) vcodec->height = num_val;

> +            else if(!strcmp(key, "videodatarate") && vcodec && 0 <= (int)num_val)

this should be checking 0 <= (int)(num_val * 1024.0) or something more
picky

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

Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- 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/20090130/4a087f8d/attachment.pgp>



More information about the ffmpeg-devel mailing list