forgot endianness conversion Speex-0.3.0
authorjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 12 Jun 2002 22:33:32 +0000 (22:33 +0000)
committerjmvalin <jmvalin@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 12 Jun 2002 22:33:32 +0000 (22:33 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@3386 0101bb08-14d6-0310-b084-bc0e0c8e3800

src/speexenc.c

index d1cb147..92800b4 100644 (file)
@@ -237,14 +237,14 @@ int main(int argc, char **argv)
          op.packet = (unsigned char *)"speex narrowband";
       if (wideband)
       op.packet = (unsigned char *)"speex wideband**";*/
-      op.packet = (unsigned char *)&header;
-      op.bytes = sizeof(header);
+      op.packet = (unsigned char *)speex_header_to_packet(&header, (int*)&(op.bytes));
       op.b_o_s = 1;
       op.e_o_s = 0;
       op.granulepos = 0;
       op.packetno = 0;
       ogg_stream_packetin(&os, &op);
-      
+      free(op.packet);
+
       op.packet = (unsigned char *)comments;
       op.bytes = strlen((char*)op.packet);
       op.b_o_s = 0;