[FFmpeg-devel] [PATCH] rdt.c: ASM rulebook bitrate reading
Michael Niedermayer
michaelni
Mon Dec 29 13:58:20 CET 2008
On Sun, Dec 28, 2008 at 06:32:22PM -0500, Ronald S. Bultje wrote:
> Hi,
>
> this patch reads the bitrate line from the ASM rulebook and fills it
> into AVStream->bit_rate, this is useful for ffplay -stats and such,
> and would in theory allow an application that is written properly to
> call av_find_stream_info() and then select a stream based on client
> bitrate or something along those lines (bitrate is not included in the
> .rm MDPR header, so this information is normally not available).
[...]
> + while (*p == ' ' && p < end) p++;
> + if (!(e_end = strchr(p, ',')) || e_end > end)
> + e_end = end;
> + if (!(first && *p == '#')) {
> + if (!strncasecmp(p, "averagebandwidth=", 17))
> + st->codec->bit_rate = atoi(p+17);
> + }
> + p = e_end + 1;
> + first = 0;
sscanf(" averagebandwidth=%d", &st->codec->bit_rate);
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Republics decline into democracies and democracies degenerate into
despotisms. -- 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/20081229/443c1c81/attachment.pgp>
More information about the ffmpeg-devel
mailing list