[SCM] libav/experimental: Corrections so that builds with DEBUG work

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:57:29 UTC 2013


The following commit has been merged in the experimental branch:
commit bdb4b698d8bc0ffa128d057e15edabfdd83aef8b
Author: Michel Bardiaux <mbardiaux at mediaxim.be>
Date:   Thu Mar 8 14:49:43 2007 +0000

    Corrections so that builds with DEBUG work
    
    Originally committed as revision 8295 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 9246b52..b385f84 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -429,7 +429,8 @@ uint64_t time= rdtsc();
 #endif
 #ifdef DEBUG
     av_log(avctx, AV_LOG_DEBUG, "*****frame %d size=%d\n", avctx->frame_number, buf_size);
-    av_log(avctx, AV_LOG_DEBUG, "bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
+    if(buf_size>0)
+        av_log(avctx, AV_LOG_DEBUG, "bytes=%x %x %x %x\n", buf[0], buf[1], buf[2], buf[3]);
 #endif
     s->flags= avctx->flags;
     s->flags2= avctx->flags2;
diff --git a/libavcodec/wma.c b/libavcodec/wma.c
index 75d5d21..27a84ea 100644
--- a/libavcodec/wma.c
+++ b/libavcodec/wma.c
@@ -171,7 +171,7 @@ int ff_wma_init(AVCodecContext * avctx, int flags2)
             high_freq = high_freq * 0.5;
         }
     }
-    dprintf("flags1=0x%x flags2=0x%x\n", flags1, flags2);
+    dprintf("flags2=0x%x\n", flags2);
     dprintf("version=%d channels=%d sample_rate=%d bitrate=%d block_align=%d\n",
            s->version, s->nb_channels, s->sample_rate, s->bit_rate,
            s->block_align);
diff --git a/libavformat/rtp_h264.c b/libavformat/rtp_h264.c
index 2d31822..d38e878 100644
--- a/libavformat/rtp_h264.c
+++ b/libavformat/rtp_h264.c
@@ -164,7 +164,9 @@ static int h264_handle_packet(RTPDemuxContext * s,
                               const uint8_t * buf,
                               int len)
 {
-//    h264_rtp_extra_data *data = s->dynamic_protocol_context;
+#ifdef DEBUG
+    h264_rtp_extra_data *data = s->dynamic_protocol_context;
+#endif
     uint8_t nal = buf[0];
     uint8_t type = (nal & 0x1f);
     int result= 0;
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 1a54aca..a391f9c 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -150,9 +150,9 @@
 
 /* dprintf macros */
 #ifdef DEBUG
-#    define dprintf(fmt,...) av_log(NULL, AV_LOG_DEBUG, fmt, __VA_ARGS__)
+#    define dprintf(...) av_log(NULL, AV_LOG_DEBUG, __VA_ARGS__)
 #else
-#    define dprintf(fmt,...)
+#    define dprintf(...)
 #endif
 
 #define av_abort()      do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list