[prev in list] [next in list] [prev in thread] [next in thread]
List: ogg-dev
Subject: [ogg-dev] [PATCH] update fisbone size in ffmpeg2theora
From: "ogg.k.ogg.k () googlemail ! com" <ogg ! k ! ogg ! k () googlemail ! com>
Date: 2008-03-27 14:36:27
Message-ID: ccbc6dd90803270736t25080fe0j55c18b83abbc6056 () mail ! gmail ! com
[Download RAW message or body]
Hi,
this updates the sizes of the fisbone ogg_packets after the removal of the x-
prefixes.
Not tested, don't have ffmpeg on this machine, but compiled nonetheless :)
Cheers
["ffmpeg2theora-fisbone-size.diff" (text/x-patch)]
--- /mnt/eagle2/e0/svn/xiph/ffmpeg2theora/theorautils.c 2008-03-27 14:22:00.107813000 \
+0000
+++ theorautils.c 2008-03-27 14:32:16.656324348 +0000
@@ -155,10 +155,10 @@
if (!info->audio_only) {
memset (&op, 0, sizeof (op));
- op.packet = _ogg_calloc (82, sizeof(unsigned char));
+ op.packet = _ogg_calloc (80, sizeof(unsigned char));
if (op.packet == NULL) return;
- memset (op.packet, 0, 82);
+ memset (op.packet, 0, 80);
/* it will be the fisbone packet for the theora video */
memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
write32le(op.packet+8, FISBONE_MESSAGE_HEADER_OFFSET); /* offset of the \
message header fields */ @@ -170,11 +170,11 @@
write64le(op.packet+36, 0); /* start granule */
write32le(op.packet+44, 0); /* preroll, for theora its 0 */
*(op.packet+48) = theora_granule_shift (&info->ti); /* granule shift */
- memcpy(op.packet+FISBONE_SIZE, "Content-Type: video/theora\r\n", 30); /* \
message header field, Content-Type */ + memcpy(op.packet+FISBONE_SIZE, \
"Content-Type: video/theora\r\n", 28); /* message header field, Content-Type */
op.b_o_s = 0;
op.e_o_s = 0;
- op.bytes = 82; /* size of the packet in bytes */
+ op.bytes = 80; /* size of the packet in bytes */
ogg_stream_packetin (&info->so, &op);
_ogg_free (op.packet);
@@ -182,10 +182,10 @@
if (!info->video_only) {
memset (&op, 0, sizeof (op));
- op.packet = _ogg_calloc (82, sizeof(unsigned char));
+ op.packet = _ogg_calloc (80, sizeof(unsigned char));
if (op.packet == NULL) return;
- memset (op.packet, 0, 82);
+ memset (op.packet, 0, 80);
/* it will be the fisbone packet for the vorbis audio */
memcpy (op.packet, FISBONE_IDENTIFIER, 8); /* identifier */
write32le(op.packet+8, FISBONE_MESSAGE_HEADER_OFFSET); /* offset of the \
message header fields */ @@ -197,12 +197,12 @@
write64le(op.packet+36, 0); /* start granule */
write32le(op.packet+44, 2); /* preroll, for vorbis its 2 */
*(op.packet+48) = 0; /* granule shift, always 0 for vorbis */
- memcpy (op.packet+FISBONE_SIZE, "Content-Type: audio/vorbis\r\n", 30);
+ memcpy (op.packet+FISBONE_SIZE, "Content-Type: audio/vorbis\r\n", 28);
/* Important: Check the case of Content-Type for correctness */
op.b_o_s = 0;
op.e_o_s = 0;
- op.bytes = 82;
+ op.bytes = 80;
ogg_stream_packetin (&info->so, &op);
_ogg_free (op.packet);
_______________________________________________
ogg-dev mailing list
ogg-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/ogg-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic