[Ffmpeg-devel] [PATCH] Added another GUID to asf.[ch]
Michael Niedermayer
michaelni
Tue Feb 20 00:24:13 CET 2007
Hi
On Mon, Feb 19, 2007 at 02:23:13PM -0600, Ryan Martell wrote:
> Hi--
>
> Attached patch adds the stream_bitrate GUID to the asf parsing code,
> and set stream bitrate properties accordingly.
>
> Values are set but currently unused; but will be necessary for mms
> parsing.
>
[...]
> @@ -345,6 +348,23 @@
> get_str16_nolen(pb, len3, s->copyright, sizeof(s->copyright));
> get_str16_nolen(pb, len4, s->comment , sizeof(s->comment));
> url_fskip(pb, len5);
> + } else if (!memcmp(&g, &stream_bitrate_guid, sizeof(GUID))) {
> + uint16_t streams = get_le16(pb);
this doesnt need to be exactly 16 bits
> + int j;
> +
> +// av_log(NULL, AV_LOG_ERROR, "stream bitrate properties\n");
> +// av_log(NULL, AV_LOG_ERROR, "streams %d\n", streams);
> + for(j = 0; j < streams; j++) {
> + uint16_t flags;
> + uint32_t bitrate;
> + int stream_id;
int stream_id, flags, bitrate;
none of them needs to be exactly 32 or 16bits
[...]
> Index: asf.h
> ===================================================================
> --- asf.h (revision 8028)
> +++ asf.h (working copy)
> @@ -76,6 +76,7 @@
> int is_streamed;
> int asfid2avid[128]; ///< conversion table from asf ID 2 AVStream ID
> ASFStream streams[128]; ///< it's max number and it's not that big
> + uint32_t stream_bitrates[128]; ///< max number of streams, bitrate for each (for streaming)
> /* non streamed additonnal info */
> uint64_t nb_packets; ///< how many packets are there in the file, invalid if broadcasting
please align the comment with the other comments
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I count him braver who overcomes his desires than him who conquers his
enemies for the hardest victory is over self. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070220/aca8b32b/attachment.pgp>
More information about the ffmpeg-devel
mailing list