Revision 8bd32c04

View differences:

libavformat/rtsp.c
847 847
    RTSPHeader reply1, *reply = &reply1;
848 848
    unsigned char *content = NULL;
849 849
    RTSPStream *rtsp_st;
850
    int protocol_mask;
850
    int protocol_mask = 0;
851 851
    AVStream *st;
852 852

  
853 853
    /* extract hostname and port */
......
868 868
            if (option_list)
869 869
                *(option_list++) = 0;
870 870
            /* handle the options */
871
            if (strcmp(option, "udp") == 0)
872
                protocol_mask = (1<< RTSP_PROTOCOL_RTP_UDP);
873
            else if (strcmp(option, "multicast") == 0)
874
                protocol_mask = (1<< RTSP_PROTOCOL_RTP_UDP_MULTICAST);
875
            else if (strcmp(option, "tcp") == 0)
876
                protocol_mask = (1<< RTSP_PROTOCOL_RTP_TCP);
871 877
        }
872 878
    }
873 879

  
880
    if (!protocol_mask)
881
        protocol_mask = rtsp_default_protocols;
882

  
874 883
    /* open the tcp connexion */
875 884
    snprintf(tcpname, sizeof(tcpname), "tcp://%s:%d", host, port);
876 885
    if (url_open(&rtsp_hd, tcpname, URL_RDWR) < 0)
......
901 910
        goto fail;
902 911
    }
903 912

  
904
    protocol_mask = rtsp_default_protocols;
905

  
906 913
    /* for each stream, make the setup request */
907 914
    /* XXX: we assume the same server is used for the control of each
908 915
       RTSP stream */

Also available in: Unified diff