rtsp: Request that dynamic rate is disabled
authorMartin Storsjö <martin@martin.st>
Mon, 27 Dec 2010 07:51:09 +0000 (09:51 +0200)
committerMartin Storsjö <martin@martin.st>
Wed, 12 Oct 2011 11:48:47 +0000 (14:48 +0300)
DSS enables this automatically if streaming VOD over TCP. If
enabled, the server feeds packets faster than realtime, screwing
up RTCP NTP based timestamps.

Also, DSS doesn't indicate that this was indicated, if it was
enabled automatically (although if it was requested to be enabled,
a header saying that it was enabled is added, but this isn't
added if it is enabled automatically), making it even harder
to detect and work around properly without explicitly asking
for it to be disabled(/enabled, if we were able to support it).

Signed-off-by: Martin Storsjö <martin@martin.st>
libavformat/rtsp.c

index ba104d2..674a8b6 100644 (file)
@@ -1168,6 +1168,8 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port,
         snprintf(cmd, sizeof(cmd),
                  "Transport: %s\r\n",
                  transport);
+        if (rt->accept_dynamic_rate)
+            av_strlcat(cmd, "x-Dynamic-Rate: 0\r\n", sizeof(cmd));
         if (i == 0 && rt->server_type == RTSP_SERVER_REAL && CONFIG_RTPDEC) {
             char real_res[41], real_csum[9];
             ff_rdt_calc_response_and_checksum(real_res, real_csum,