changeset 6289:fb720b9d8ee1 libavformat

Send a time test to the server, as the spec recommends. Patch by Zhentan Feng <spyfeng gmail com>.
author rbultje
date Tue, 20 Jul 2010 14:59:23 +0000
parents ab5b82b7b8e6
children a1500faf3a7e
files mmst.c
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mmst.c	Tue Jul 20 14:13:24 2010 +0000
+++ b/mmst.c	Tue Jul 20 14:59:23 2010 +0000
@@ -179,6 +179,13 @@
     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 @@
     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;