[FFmpeg-cvslog] Check syntax even if DEBUG is not defined.

Reimar Döffinger git at videolan.org
Wed May 11 12:27:44 CEST 2011


ffmpeg | branch: master | Reimar Döffinger <Reimar.Doeffinger at gmx.de> | Wed May 11 12:26:25 2011 +0200| [3b6bbfa0631d237f2bbc85a7b43907733bea1e82] | committer: Carl Eugen Hoyos

Check syntax even if DEBUG is not defined.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b6bbfa0631d237f2bbc85a7b43907733bea1e82
---

 libavcodec/mjpegdec.c |    4 ----
 libavutil/log.h       |    2 +-
 2 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 3b1a8ab..afcc1b7 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1282,9 +1282,7 @@ static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end)
     const uint8_t *buf_ptr;
     unsigned int v, v2;
     int val;
-#ifdef DEBUG
     int skipped=0;
-#endif
 
     buf_ptr = *pbuf_ptr;
     while (buf_ptr < buf_end) {
@@ -1294,9 +1292,7 @@ static int find_marker(const uint8_t **pbuf_ptr, const uint8_t *buf_end)
             val = *buf_ptr++;
             goto found;
         }
-#ifdef DEBUG
         skipped++;
-#endif
     }
     val = -1;
 found:
diff --git a/libavutil/log.h b/libavutil/log.h
index 0bcf2c4..c87125d 100644
--- a/libavutil/log.h
+++ b/libavutil/log.h
@@ -143,7 +143,7 @@ const char* av_default_item_name(void* ctx);
 #ifdef DEBUG
 #    define av_dlog(pctx, ...) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__)
 #else
-#    define av_dlog(pctx, ...)
+#    define av_dlog(pctx, ...) do { if (0) av_log(pctx, AV_LOG_DEBUG, __VA_ARGS__); } while (0)
 #endif
 
 /**



More information about the ffmpeg-cvslog mailing list