rtsp: Parse the mode=receive/record parameter in transport lines
We need to support the nonstandard mode=receive, for compatibility with older libavformat clients. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
		
							parent
							
								
									ed219ed366
								
							
						
					
					
						commit
						45b068580b
					
				@ -749,6 +749,14 @@ static void rtsp_parse_transport(RTSPMessageHeader *reply, const char *p)
 | 
			
		||||
                    get_word_sep(buf, sizeof(buf), ";,", &p);
 | 
			
		||||
                    av_strlcpy(th->source, buf, sizeof(th->source));
 | 
			
		||||
                }
 | 
			
		||||
            } else if (!strcmp(parameter, "mode")) {
 | 
			
		||||
                if (*p == '=') {
 | 
			
		||||
                    p++;
 | 
			
		||||
                    get_word_sep(buf, sizeof(buf), ";, ", &p);
 | 
			
		||||
                    if (!strcmp(buf, "record") ||
 | 
			
		||||
                        !strcmp(buf, "receive"))
 | 
			
		||||
                        th->mode_record = 1;
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            while (*p != ';' && *p != '\0' && *p != ',')
 | 
			
		||||
 | 
			
		||||
@ -102,6 +102,9 @@ typedef struct RTSPTransportField {
 | 
			
		||||
     * packets will be allowed to make before being discarded. */
 | 
			
		||||
    int ttl;
 | 
			
		||||
 | 
			
		||||
    /** transport set to record data */
 | 
			
		||||
    int mode_record;
 | 
			
		||||
 | 
			
		||||
    struct sockaddr_storage destination; /**< destination IP address */
 | 
			
		||||
    char source[INET6_ADDRSTRLEN + 1]; /**< source IP address */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user