[FFmpeg-soc] [soc]: r5708 - mms/mmst.c

spyfeng subversion at mplayerhq.hu
Tue Mar 23 17:15:44 CET 2010


Author: spyfeng
Date: Tue Mar 23 17:15:43 2010
New Revision: 5708

Log:
use ff_put_str16_nolen() from asfenc.c.

Modified:
   mms/mmst.c

Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c	Tue Mar 23 16:33:36 2010	(r5707)
+++ mms/mmst.c	Tue Mar 23 17:15:43 2010	(r5708)
@@ -158,20 +158,6 @@ static void insert_command_prefixes(MMSC
     put_le32(context, prefix2); // second prefix
 }
 
-static void put_le_utf16(ByteIOContext *pb, char *utf8)
-{
-    int val;
-
-    while(*utf8) {
-        GET_UTF8(val, *utf8++, break;);
-        put_le16(pb, val);
-    }
-
-    put_le16(pb, 0x00);
-
-    return;
-}
-
 /** Send a prepared MMST command packet. */
 static int send_command_packet(MMSContext *mms)
 {
@@ -219,7 +205,7 @@ static int send_protocol_select(MMSConte
             mms->local_ip_address&0xff,
             "TCP",                                    // or UDP
             mms->local_port);
-    put_le_utf16(&mms->outgoing_packet_data, data_string);
+    ff_put_str16_nolen(&mms->outgoing_packet_data, data_string);
 
     return send_command_packet(mms);
 }
@@ -230,7 +216,7 @@ static int send_media_file_request(MMSCo
     insert_command_prefixes(mms, 1, 0xffffffff);
     put_le32(&mms->outgoing_packet_data, 0);
     put_le32(&mms->outgoing_packet_data, 0);
-    put_le_utf16(&mms->outgoing_packet_data, mms->path+1); // +1 for skip "/".
+    ff_put_str16_nolen(&mms->outgoing_packet_data, mms->path+1); // +1 for skip "/".
     put_le32(&mms->outgoing_packet_data, 0);
 
     return send_command_packet(mms);
@@ -428,7 +414,7 @@ static int send_startup_packet(MMSContex
     start_command_packet(mms, CS_PKT_INITIAL);
     insert_command_prefixes(mms, 0, 0x0004000b);
     put_le32(&mms->outgoing_packet_data, 0x0003001c);
-    put_le_utf16(&mms->outgoing_packet_data, data_string);
+    ff_put_str16_nolen(&mms->outgoing_packet_data, data_string);
     put_le16(&mms->outgoing_packet_data, 0); // double unicode ended string.
 
     return send_command_packet(mms);


More information about the FFmpeg-soc mailing list