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

spyfeng subversion at mplayerhq.hu
Wed Apr 7 18:55:49 CEST 2010


Author: spyfeng
Date: Wed Apr  7 18:55:49 2010
New Revision: 5738

Log:
remove mms_open_cnx() and implement it in mms_open() directly.

Modified:
   mms/mmst.c

Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c	Wed Apr  7 18:48:45 2010	(r5737)
+++ mms/mmst.c	Wed Apr  7 18:55:49 2010	(r5738)
@@ -553,9 +553,9 @@ static int handle_mms_msg_pkt(MMSContext
     return ret;
 }
 
-static int mms_open_cnx(URLContext *h, const char *url)
+static int mms_open(URLContext *h, const char *uri, int flags)
 {
-    MMSContext *mms = h->priv_data;
+    MMSContext *mms;
     MMSSCPacketType packet_type;
     int port;
 
@@ -563,10 +563,14 @@ static int mms_open_cnx(URLContext *h, c
     int err = AVERROR(EIO);
     int ret;
 
+    h->is_streamed = 1;
+    h->priv_data = av_mallocz(sizeof(MMSContext));
+    mms = (MMSContext *) h->priv_data;
+
     // only for MMS over TCP, so set proto = NULL
     ff_url_split(NULL, 0, NULL, 0,
             mms->host, sizeof(mms->host), &port, mms->path,
-            sizeof(mms->path), url);
+            sizeof(mms->path), uri);
 
     if(port<0)
         port = 1755; // defaut mms protocol port
@@ -603,16 +607,6 @@ fail:
     return err;
 }
 
-static int mms_open(URLContext *h, const char *uri, int flags)
-{
-    MMSContext *mms;
-
-    h->is_streamed = 1;
-    h->priv_data = av_mallocz(sizeof(MMSContext));
-
-    return mms_open_cnx(h, uri);
-}
-
 static int send_media_packet_request(MMSContext *mms)
 {
     start_command_packet(mms, CS_PKT_START_FROM_PKT_ID);


More information about the FFmpeg-soc mailing list