[FFmpeg-soc] [soc]: r5888 - in mms: mms.h mmsh.c mmst.c

spyfeng subversion at mplayerhq.hu
Mon Aug 2 18:18:10 CEST 2010


Author: spyfeng
Date: Mon Aug  2 18:18:10 2010
New Revision: 5888

Log:
modify the code for vertical alignment.

Modified:
   mms/mms.h
   mms/mmsh.c
   mms/mmst.c

Modified: mms/mms.h
==============================================================================
--- mms/mms.h	Mon Aug  2 18:06:03 2010	(r5887)
+++ mms/mms.h	Mon Aug  2 18:18:10 2010	(r5888)
@@ -34,7 +34,7 @@ typedef struct {
     /** Buffer for outgoing packets. */
     /*@{*/
     uint8_t *write_out_ptr;              ///< Pointer for writting the buffer.
-    uint8_t out_buffer[8192];             ///< Buffer for outgoing packet.
+    uint8_t out_buffer[8192];            ///< Buffer for outgoing packet.
     /*@}*/
 
     /** Buffer for incoming packets. */

Modified: mms/mmsh.c
==============================================================================
--- mms/mmsh.c	Mon Aug  2 18:06:03 2010	(r5887)
+++ mms/mmsh.c	Mon Aug  2 18:18:10 2010	(r5888)
@@ -81,7 +81,7 @@ typedef struct
 static int mmsh_close(URLContext *h)
 {
     MMSHContext *mmsh_ctx = (MMSHContext *)h->priv_data;
-    MMSContext *mms = mmsh_ctx->ff_ctx;
+    MMSContext *mms       = mmsh_ctx->ff_ctx;
     if(mms->mms_hd)
         url_close(mms->mms_hd);
     av_freep(&mms->asf_header);
@@ -104,7 +104,7 @@ static int get_chunk_header(MMSHContext 
         return AVERROR(EIO);
     }
     chunk_type = AV_RL16(chunk_header);
-    chunk_len = AV_RL16(chunk_header + 2);
+    chunk_len  = AV_RL16(chunk_header + 2);
     if (chunk_type == CHUNK_TYPE_END ||chunk_type == CHUNK_TYPE_STREAM_CHANGE) {
         ext_header_len = 4;
     } else if (chunk_type == CHUNK_TYPE_ASF_HEADER || chunk_type == CHUNK_TYPE_DATA) {
@@ -128,7 +128,7 @@ static int get_chunk_header(MMSHContext 
 
 static int read_data_packet(MMSHContext *mmsh_ctx, const int len)
 {
-    MMSContext *mms = mmsh_ctx->ff_ctx;
+    MMSContext *mms   = mmsh_ctx->ff_ctx;
     int res, pad_size = 0;
     res = url_read_complete(mms->mms_hd, mms->in_buffer, len);
     dprintf(NULL, "data packet len = %d\n", len);
@@ -143,7 +143,7 @@ static int read_data_packet(MMSHContext 
         pad_size = mms->asf_packet_len - len;
         memset(mms->in_buffer + len, 0, pad_size);
     }
-    mms->read_in_ptr = mms->in_buffer;
+    mms->read_in_ptr      = mms->in_buffer;
     mms->remaining_in_len = mms->asf_packet_len;
     return 0;
 }
@@ -273,7 +273,7 @@ static int mmsh_open_cnx(MMSHContext *mm
           return AVERROR(EIO);
     }
 
-   err = get_http_header_data(mmsh_ctx);
+    err = get_http_header_data(mmsh_ctx);
     if (err) {
         dprintf(NULL, "get http header data fialed!\n");
         return (err);
@@ -343,7 +343,7 @@ static int mmsh_read(URLContext *h, uint
 {
     int res = 0;
     MMSHContext *mmsh_ctx = h->priv_data;
-    MMSContext *mms = mmsh_ctx->ff_ctx;
+    MMSContext *mms       = mmsh_ctx->ff_ctx;
     do{
         if (mms->asf_header_read_size < mms->asf_header_size) {
             // copy asf header into buffer

Modified: mms/mmst.c
==============================================================================
--- mms/mmst.c	Mon Aug  2 18:06:03 2010	(r5887)
+++ mms/mmst.c	Mon Aug  2 18:18:10 2010	(r5888)
@@ -309,10 +309,10 @@ static MMSSCPacketType get_tcp_server_re
 
             // note we cache the first 8 bytes,
             // then fill up the buffer with the others
-            tmp                       = AV_RL16(mms->in_buffer + 6);
-            length_remaining          = (tmp - 8) & 0xffff;
+            tmp                            = AV_RL16(mms->in_buffer + 6);
+            length_remaining               = (tmp - 8) & 0xffff;
             mmst_ctx->incoming_packet_seq  = AV_RL32(mms->in_buffer);
-            packet_id_type            = mms->in_buffer[4];
+            packet_id_type                 = mms->in_buffer[4];
             mmst_ctx->incoming_flags       = mms->in_buffer[5];
 
             if (length_remaining < 0
@@ -499,7 +499,7 @@ static int send_media_packet_request(MMS
 
 static void clear_stream_buffers(MMSTContext *mmst_ctx)
 {
-    MMSContext *mms = mmst_ctx->ff_ctx;
+    MMSContext *mms       = mmst_ctx->ff_ctx;
     mms->remaining_in_len = 0;
     mms->read_in_ptr      = mms->in_buffer;
 }
@@ -592,8 +592,8 @@ static int mms_read(URLContext *h, uint8
 {
     /* TODO: see tcp.c:tcp_read() about a possible timeout scheme */
     MMSTContext *mmst_ctx = h->priv_data;
-    int result = 0;
-    MMSContext *mms = mmst_ctx->ff_ctx;
+    int result            = 0;
+    MMSContext *mms       = mmst_ctx->ff_ctx;
     do {
         if(mms->asf_header_read_size < mms->asf_header_size) {
            result =  ff_mms_read_header(mms, buf, size);


More information about the FFmpeg-soc mailing list