aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorZhentan Feng <spyfeng@gmail.com>2010-07-20 14:59:23 +0000
committerRonald S. Bultje <rsbultje@gmail.com>2010-07-20 14:59:23 +0000
commit414df121e0a45bb14a2f885d6c5d0a2904643e34 (patch)
tree009263045a2aabed4085ab641808ff29d2b7fb96 /libavformat
parentf7af2c1db8586976a732d7c4be0379b2395dcb80 (diff)
downloadffmpeg-414df121e0a45bb14a2f885d6c5d0a2904643e34.tar.gz
Send a time test to the server, as the spec recommends.
Patch by Zhentan Feng <spyfeng gmail com>. Originally committed as revision 24357 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mmst.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavformat/mmst.c b/libavformat/mmst.c
index 1750390a2d..75fb4c6346 100644
--- a/libavformat/mmst.c
+++ b/libavformat/mmst.c
@@ -179,6 +179,13 @@ static void mms_put_utf16(MMSContext *mms, uint8_t *src)
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 char *uri, int flags)
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;