[FFmpeg-devel] [PATCH] RTP: use dprintf(), allow compilation with -DDEBUG

Måns Rullgård mans
Sun Jul 13 21:43:18 CEST 2008


Michael Niedermayer <michaelni at gmx.at> writes:

> On Sun, Jul 13, 2008 at 07:26:53PM +0100, Mans Rullgard wrote:
>> ---
>>  libavformat/rtpdec.c |    8 ++------
>>  libavformat/rtpenc.c |   12 +++---------
>>  2 files changed, 5 insertions(+), 15 deletions(-)
>> 
>> diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c
>> index 608612b..1a43bba 100644
>> --- a/libavformat/rtpdec.c
>> +++ b/libavformat/rtpdec.c
>> @@ -250,13 +250,9 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
>>      len = url_close_dyn_buf(pb, &buf);
>>      if ((len > 0) && buf) {
>>          int result;
>> -#if defined(DEBUG)
>> -        printf("sending %d bytes of RR\n", len);
>> -#endif
>> +        dprintf(NULL, "sending %d bytes of RR\n", len);
>>          result= url_write(s->rtp_ctx, buf, len);
>> -#if defined(DEBUG)
>> -        printf("result from url_write: %d\n", result);
>> -#endif
>> +        dprintf(NULL, "result from url_write: %d\n", result);
>>          av_free(buf);
>
> These could use s->ic as context instead of NULL

I didn't know it was there.  I guess I should have looked a bit
harder.

Applied with that change.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list