fix compilation with DEBUG defined

Originally committed as revision 19016 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2009-05-31 04:32:45 +00:00
parent 19c0563ac2
commit 67c9cd696a
1 changed files with 13 additions and 15 deletions

View File

@ -339,9 +339,7 @@ static void sdp_parse_line(AVFormatContext *s, SDPParseState *s1,
struct in_addr sdp_ip; struct in_addr sdp_ip;
int ttl; int ttl;
#ifdef DEBUG dprintf(s, "sdp: %c='%s'\n", letter, buf);
printf("sdp: %c='%s'\n", letter, buf);
#endif
p = buf; p = buf;
if (s1->skip_media && letter != 'm') if (s1->skip_media && letter != 'm')
@ -730,9 +728,9 @@ static void rtsp_skip_packet(AVFormatContext *s)
if (ret != 3) if (ret != 3)
return; return;
len = AV_RB16(buf + 1); len = AV_RB16(buf + 1);
#ifdef DEBUG
printf("skipping RTP packet len=%d\n", len); dprintf(s, "skipping RTP packet len=%d\n", len);
#endif
/* skip payload */ /* skip payload */
while (len > 0) { while (len > 0) {
len1 = len; len1 = len;
@ -786,7 +784,7 @@ rtsp_read_reply (AVFormatContext *s, RTSPMessageHeader *reply,
for(;;) { for(;;) {
ret = url_readbuf(rt->rtsp_hd, &ch, 1); ret = url_readbuf(rt->rtsp_hd, &ch, 1);
#ifdef DEBUG_RTP_TCP #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 #endif
if (ret != 1) if (ret != 1)
return -1; return -1;
@ -804,9 +802,9 @@ rtsp_read_reply (AVFormatContext *s, RTSPMessageHeader *reply,
} }
} }
*q = '\0'; *q = '\0';
#ifdef DEBUG
printf("line='%s'\n", buf); dprintf(s, "line='%s'\n", buf);
#endif
/* test if last line */ /* test if last line */
if (buf[0] == '\0') if (buf[0] == '\0')
break; break;
@ -858,9 +856,9 @@ static void rtsp_send_cmd_async (AVFormatContext *s,
av_strlcat(buf, buf1, sizeof(buf)); av_strlcat(buf, buf1, sizeof(buf));
} }
av_strlcat(buf, "\r\n", sizeof(buf)); av_strlcat(buf, "\r\n", sizeof(buf));
#ifdef DEBUG
printf("Sending:\n%s--\n", buf); dprintf(s, "Sending:\n%s--\n", buf);
#endif
url_write(rt->rtsp_hd, buf, strlen(buf)); url_write(rt->rtsp_hd, buf, strlen(buf));
rt->last_cmd_time = av_gettime(); rt->last_cmd_time = av_gettime();
} }
@ -1318,7 +1316,7 @@ static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
RTSPStream *rtsp_st; RTSPStream *rtsp_st;
#ifdef DEBUG_RTP_TCP #ifdef DEBUG_RTP_TCP
printf("tcp_read_packet:\n"); dprintf(s, "tcp_read_packet:\n");
#endif #endif
redo: redo:
for(;;) { for(;;) {
@ -1337,7 +1335,7 @@ static int tcp_read_packet(AVFormatContext *s, RTSPStream **prtsp_st,
id = buf[0]; id = buf[0];
len = AV_RB16(buf + 1); len = AV_RB16(buf + 1);
#ifdef DEBUG_RTP_TCP #ifdef DEBUG_RTP_TCP
printf("id=%d len=%d\n", id, len); dprintf(s, "id=%d len=%d\n", id, len);
#endif #endif
if (len > buf_size || len < 12) if (len > buf_size || len < 12)
goto redo; goto redo;