[FFmpeg-devel] [PATCH] rtsp.[ch]: status_code -> server_response

Ronald S. Bultje rsbultje
Thu Feb 5 23:27:29 CET 2009


Hi,

another variable rename, as suggested by Michael.

Ronald
-------------- next part --------------
Index: ffmpeg-svn/libavformat/rtsp.c
===================================================================
--- ffmpeg-svn.orig/libavformat/rtsp.c	2009-02-05 15:56:35.000000000 -0500
+++ ffmpeg-svn/libavformat/rtsp.c	2009-02-05 17:14:11.000000000 -0500
@@ -794,7 +794,7 @@
             /* get reply code */
             get_word(buf1, sizeof(buf1), &p);
             get_word(buf1, sizeof(buf1), &p);
-            reply->status_code = atoi(buf1);
+            reply->server_response = atoi(buf1);
         } else {
             rtsp_parse_line(reply, p);
             av_strlcat(rt->last_reply, p,    sizeof(rt->last_reply));
@@ -973,10 +973,10 @@
                         rt->session_id, real_res, real_csum);
         }
         rtsp_send_cmd(s, cmd, reply, NULL);
-        if (reply->status_code == 461 /* Unsupported protocol */ && i == 0) {
+        if (reply->server_response == 461 /* Unsupported protocol */ && i == 0) {
             err = 1;
             goto fail;
-        } else if (reply->status_code != RTSP_STATUS_OK ||
+        } else if (reply->server_response != RTSP_STATUS_OK ||
                    reply->nb_transports != 1) {
             err = AVERROR_INVALIDDATA;
             goto fail;
@@ -1127,7 +1127,7 @@
                        "GUID: 00000000-0000-0000-0000-000000000000\r\n",
                        sizeof(cmd));
         rtsp_send_cmd(s, cmd, reply, NULL);
-        if (reply->status_code != RTSP_STATUS_OK) {
+        if (reply->server_response != RTSP_STATUS_OK) {
             err = AVERROR_INVALIDDATA;
             goto fail;
         }
@@ -1163,7 +1163,7 @@
         err = AVERROR_INVALIDDATA;
         goto fail;
     }
-    if (reply->status_code != RTSP_STATUS_OK) {
+    if (reply->server_response != RTSP_STATUS_OK) {
         err = AVERROR_INVALIDDATA;
         goto fail;
     }
@@ -1328,7 +1328,7 @@
                             "Unsubscribe: %s\r\n",
                             s->filename, rt->last_subscription);
                 rtsp_send_cmd(s, cmd, reply, NULL);
-                if (reply->status_code != RTSP_STATUS_OK)
+                if (reply->server_response != RTSP_STATUS_OK)
                     return AVERROR_INVALIDDATA;
                 rt->need_subscription = 1;
             }
@@ -1364,7 +1364,7 @@
             }
             av_strlcatf(cmd, sizeof(cmd), "%s\r\n", rt->last_subscription);
             rtsp_send_cmd(s, cmd, reply, NULL);
-            if (reply->status_code != RTSP_STATUS_OK)
+            if (reply->server_response != RTSP_STATUS_OK)
                 return AVERROR_INVALIDDATA;
             rt->need_subscription = 0;
 
@@ -1439,7 +1439,7 @@
                      (double)rt->seek_timestamp / AV_TIME_BASE);
         }
         rtsp_send_cmd(s, cmd, reply, NULL);
-        if (reply->status_code != RTSP_STATUS_OK) {
+        if (reply->server_response != RTSP_STATUS_OK) {
             return -1;
         }
     }
@@ -1463,7 +1463,7 @@
                  "PAUSE %s RTSP/1.0\r\n",
                  s->filename);
         rtsp_send_cmd(s, cmd, reply, NULL);
-        if (reply->status_code != RTSP_STATUS_OK) {
+        if (reply->server_response != RTSP_STATUS_OK) {
             return -1;
         }
     }
Index: ffmpeg-svn/libavformat/rtsp.h
===================================================================
--- ffmpeg-svn.orig/libavformat/rtsp.h	2009-02-05 17:13:06.000000000 -0500
+++ ffmpeg-svn/libavformat/rtsp.h	2009-02-05 17:14:20.000000000 -0500
@@ -64,7 +64,7 @@
 
 typedef struct RTSPHeader {
     int content_length;
-    enum RTSPStatusCode status_code; /**< response code from server */
+    enum RTSPStatusCode server_response; /**< response code from server */
     int nb_transports;
     /** in AV_TIME_BASE unit, AV_NOPTS_VALUE if not used */
     int64_t range_start, range_end;



More information about the ffmpeg-devel mailing list