OSDN Git Service

rtsp: Parse the x-Accept-Dynamic-Rate header
authorMartin Storsjö <martin@martin.st>
Sun, 2 Jan 2011 12:32:18 +0000 (14:32 +0200)
committerMartin Storsjö <martin@martin.st>
Wed, 12 Oct 2011 11:48:45 +0000 (14:48 +0300)
Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtsp.c
libavformat/rtsp.h

index ff4d16a..ba104d2 100644 (file)
@@ -808,6 +808,9 @@ void ff_rtsp_parse_line(RTSPMessageHeader *reply, const char *buf,
         if (strstr(p, "GET_PARAMETER") &&
             method && !strcmp(method, "OPTIONS"))
             rt->get_parameter_supported = 1;
+    } else if (av_stristart(p, "x-Accept-Dynamic-Rate:", &p) && rt) {
+        p += strspn(p, SPACE_CHARS);
+        rt->accept_dynamic_rate = atoi(p);
     }
 }
 
index 265d9f8..62ca483 100644 (file)
@@ -346,6 +346,9 @@ typedef struct RTSPState {
      * Option flags for the chained RTP muxer.
      */
     int rtp_muxer_flags;
+
+    /** Whether the server accepts the x-Dynamic-Rate header */
+    int accept_dynamic_rate;
 } RTSPState;
 
 /**