[FFmpeg-cvslog] r24357 - trunk/libavformat/mmst.c

rbultje subversion
Tue Jul 20 16:59:23 CEST 2010


Author: rbultje
Date: Tue Jul 20 16:59:23 2010
New Revision: 24357

Log:
Send a time test to the server, as the spec recommends.

Patch by Zhentan Feng <spyfeng gmail com>.

Modified:
   trunk/libavformat/mmst.c

Modified: trunk/libavformat/mmst.c
==============================================================================
--- trunk/libavformat/mmst.c	Tue Jul 20 16:15:23 2010	(r24356)
+++ trunk/libavformat/mmst.c	Tue Jul 20 16:59:23 2010	(r24357)
@@ -179,6 +179,13 @@ static void mms_put_utf16(MMSContext *mm
     mms->write_out_ptr += len;
 }
 
+static int send_time_test_data(MMSContext *mms)
+{
+    start_command_packet(mms, CS_PKT_TIMING_DATA_REQUEST);
+    insert_command_prefixes(mms, 0xf0f0f0f1, 0x0004000b);
+    return send_command_packet(mms);
+}
+
 static int send_protocol_select(MMSContext *mms)
 {
     char data_string[256];
@@ -599,6 +606,9 @@ static int mms_open(URLContext *h, const
     err = mms_safe_send_recv(mms, send_startup_packet, SC_PKT_CLIENT_ACCEPTED);
     if (err)
         goto fail;
+    err = mms_safe_send_recv(mms, send_time_test_data, SC_PKT_TIMING_TEST_REPLY);
+    if (err)
+        goto fail;
     err = mms_safe_send_recv(mms, send_protocol_select, SC_PKT_PROTOCOL_ACCEPTED);
     if (err)
         goto fail;



More information about the ffmpeg-cvslog mailing list