Mercurial > libavformat.hg
diff rtpenc.c @ 3579:e6a42f4e5429 libavformat
RTP: use dprintf(), allow compilation with -DDEBUG
author | mru |
---|---|
date | Sun, 13 Jul 2008 19:41:10 +0000 |
parents | 26f05fd01fd0 |
children | 77e0c7511d41 |
line wrap: on
line diff
--- a/rtpenc.c Sun Jul 13 19:41:07 2008 +0000 +++ b/rtpenc.c Sun Jul 13 19:41:10 2008 +0000 @@ -120,9 +120,7 @@ RTPDemuxContext *s = s1->priv_data; uint32_t rtp_ts; -#if defined(DEBUG) - printf("RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp); -#endif + dprintf(s1, "RTCP: %02x %"PRIx64" %x\n", s->payload_type, ntp_time, s->timestamp); if (s->first_rtcp_ntp_time == AV_NOPTS_VALUE) s->first_rtcp_ntp_time = ntp_time; s->last_rtcp_ntp_time = ntp_time; @@ -146,9 +144,7 @@ { RTPDemuxContext *s = s1->priv_data; -#ifdef DEBUG - printf("rtp_send_data size=%d\n", len); -#endif + dprintf(s1, "rtp_send_data size=%d\n", len); /* build the RTP header */ put_byte(s1->pb, (RTP_VERSION << 6)); @@ -301,9 +297,7 @@ int size= pkt->size; uint8_t *buf1= pkt->data; -#ifdef DEBUG - printf("%d: write len=%d\n", pkt->stream_index, size); -#endif + dprintf(s1, "%d: write len=%d\n", pkt->stream_index, size); rtcp_bytes = ((s->octet_count - s->last_octet_count) * RTCP_TX_RATIO_NUM) / RTCP_TX_RATIO_DEN;