Revision 67c9cd69 libavformat/rtsp.c

View differences:

libavformat/rtsp.c
339 339
    struct in_addr sdp_ip;
340 340
    int ttl;
341 341

  
342
#ifdef DEBUG
343
    printf("sdp: %c='%s'\n", letter, buf);
344
#endif
342
    dprintf(s, "sdp: %c='%s'\n", letter, buf);
345 343

  
346 344
    p = buf;
347 345
    if (s1->skip_media && letter != 'm')
......
730 728
    if (ret != 3)
731 729
        return;
732 730
    len = AV_RB16(buf + 1);
733
#ifdef DEBUG
734
    printf("skipping RTP packet len=%d\n", len);
735
#endif
731

  
732
    dprintf(s, "skipping RTP packet len=%d\n", len);
733

  
736 734
    /* skip payload */
737 735
    while (len > 0) {
738 736
        len1 = len;
......
786 784
        for(;;) {
787 785
            ret = url_readbuf(rt->rtsp_hd, &ch, 1);
788 786
#ifdef DEBUG_RTP_TCP
789
            printf("ret=%d c=%02x [%c]\n", ret, ch, ch);
787
            dprintf(s, "ret=%d c=%02x [%c]\n", ret, ch, ch);
790 788
#endif
791 789
            if (ret != 1)
792 790
                return -1;
......
804 802
            }
805 803
        }
806 804
        *q = '\0';
807
#ifdef DEBUG
808
        printf("line='%s'\n", buf);
809
#endif
805

  
806
        dprintf(s, "line='%s'\n", buf);
807

  
810 808
        /* test if last line */
811 809
        if (buf[0] == '\0')
812 810
            break;
......
858 856
        av_strlcat(buf, buf1, sizeof(buf));
859 857
    }
860 858
    av_strlcat(buf, "\r\n", sizeof(buf));
861
#ifdef DEBUG
862
    printf("Sending:\n%s--\n", buf);
863
#endif
859

  
860
    dprintf(s, "Sending:\n%s--\n", buf);
861

  
864 862
    url_write(rt->rtsp_hd, buf, strlen(buf));
865 863
    rt->last_cmd_time = av_gettime();
866 864
}
......
1318 1316
    RTSPStream *rtsp_st;
1319 1317

  
1320 1318
#ifdef DEBUG_RTP_TCP
1321
    printf("tcp_read_packet:\n");
1319
    dprintf(s, "tcp_read_packet:\n");
1322 1320
#endif
1323 1321
 redo:
1324 1322
    for(;;) {
......
1337 1335
    id = buf[0];
1338 1336
    len = AV_RB16(buf + 1);
1339 1337
#ifdef DEBUG_RTP_TCP
1340
    printf("id=%d len=%d\n", id, len);
1338
    dprintf(s, "id=%d len=%d\n", id, len);
1341 1339
#endif
1342 1340
    if (len > buf_size || len < 12)
1343 1341
        goto redo;

Also available in: Unified diff