Mercurial > libavformat.hg
changeset 4990:0b15fbb456f4 libavformat
fix compilation with DEBUG defined
author | bcoudurier |
---|---|
date | Sun, 31 May 2009 04:32:45 +0000 |
parents | 7cd258a049b1 |
children | 2b0d60d31f3d |
files | rtsp.c |
diffstat | 1 files changed, 13 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/rtsp.c Sun May 31 04:13:25 2009 +0000 +++ b/rtsp.c Sun May 31 04:32:45 2009 +0000 @@ -339,9 +339,7 @@ struct in_addr sdp_ip; int ttl; -#ifdef DEBUG - printf("sdp: %c='%s'\n", letter, buf); -#endif + dprintf(s, "sdp: %c='%s'\n", letter, buf); p = buf; if (s1->skip_media && letter != 'm') @@ -730,9 +728,9 @@ if (ret != 3) return; len = AV_RB16(buf + 1); -#ifdef DEBUG - printf("skipping RTP packet len=%d\n", len); -#endif + + dprintf(s, "skipping RTP packet len=%d\n", len); + /* skip payload */ while (len > 0) { len1 = len; @@ -786,7 +784,7 @@ for(;;) { ret = url_readbuf(rt->rtsp_hd, &ch, 1); #ifdef DEBUG_RTP_TCP - printf("ret=%d c=%02x [%c]\n", ret, ch, ch); + dprintf(s, "ret=%d c=%02x [%c]\n", ret, ch, ch); #endif if (ret != 1) return -1; @@ -804,9 +802,9 @@ } } *q = '\0'; -#ifdef DEBUG - printf("line='%s'\n", buf); -#endif + + dprintf(s, "line='%s'\n", buf); + /* test if last line */ if (buf[0] == '\0') break; @@ -858,9 +856,9 @@ av_strlcat(buf, buf1, sizeof(buf)); } av_strlcat(buf, "\r\n", sizeof(buf)); -#ifdef DEBUG - printf("Sending:\n%s--\n", buf); -#endif + + dprintf(s, "Sending:\n%s--\n", buf); + url_write(rt->rtsp_hd, buf, strlen(buf)); rt->last_cmd_time = av_gettime(); } @@ -1318,7 +1316,7 @@ RTSPStream *rtsp_st; #ifdef DEBUG_RTP_TCP - printf("tcp_read_packet:\n"); + dprintf(s, "tcp_read_packet:\n"); #endif redo: for(;;) { @@ -1337,7 +1335,7 @@ id = buf[0]; len = AV_RB16(buf + 1); #ifdef DEBUG_RTP_TCP - printf("id=%d len=%d\n", id, len); + dprintf(s, "id=%d len=%d\n", id, len); #endif if (len > buf_size || len < 12) goto redo;