[FFmpeg-cvslog] libzvbi-teletextdec: use av_dlog where possible

Marton Balint git at videolan.org
Sun Mar 9 03:26:43 CET 2014


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Mar  1 23:31:04 2014 +0100| [ae017c26325ff8f3d8ebdcd5951d03f92c28147f] | committer: Marton Balint

libzvbi-teletextdec: use av_dlog where possible

Signed-off-by: Marton Balint <cus at passwd.hu>

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

 libavcodec/libzvbi-teletextdec.c |   17 +++++------------
 1 file changed, 5 insertions(+), 12 deletions(-)

diff --git a/libavcodec/libzvbi-teletextdec.c b/libavcodec/libzvbi-teletextdec.c
index 4129bac..2b1be82 100644
--- a/libavcodec/libzvbi-teletextdec.c
+++ b/libavcodec/libzvbi-teletextdec.c
@@ -23,6 +23,7 @@
 #include "libavutil/opt.h"
 #include "libavutil/bprint.h"
 #include "libavutil/intreadwrite.h"
+#include "libavutil/log.h"
 
 #include <libzvbi.h>
 
@@ -272,10 +273,7 @@ static int gen_sub_bitmap(TeletextContext *ctx, AVSubtitleRect *sub_rect, vbi_pa
         b = VBI_B(page->color_map[ci]);
         a = VBI_A(page->color_map[ci]);
         ((uint32_t *)sub_rect->pict.data[1])[ci] = RGBA(r, g, b, a);
-#ifdef DEBUG
-        av_log(ctx, AV_LOG_DEBUG, "palette %0x\n",
-               ((uint32_t *)sub_rect->pict.data[1])[ci]);
-#endif
+        av_dlog(ctx, "palette %0x\n", ((uint32_t *)sub_rect->pict.data[1])[ci]);
     }
     ((uint32_t *)sub_rect->pict.data[1])[cmax] = RGBA(0, 0, 0, 0);
     sub_rect->type = SUBTITLE_BITMAP;
@@ -404,11 +402,8 @@ static int teletext_decode_frame(AVCodecContext *avctx, void *data, int *data_si
         while (left > 0) {
             int64_t pts = 0;
             unsigned int lines = vbi_dvb_demux_cor(ctx->dx, ctx->sliced, 64, &pts, &buf, &left);
-#ifdef DEBUG
-            av_log(avctx, AV_LOG_DEBUG,
-                   "ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f\n",
-                   ctx, pkt->size, left, lines, (double)pts/90000.0, (double)pkt->pts/90000.0);
-#endif
+            av_dlog(avctx, "ctx=%p buf_size=%d left=%u lines=%u pts=%f pkt_pts=%f\n",
+                    ctx, pkt->size, left, lines, (double)pts/90000.0, (double)pkt->pts/90000.0);
             if (lines > 0) {
 #ifdef DEBUGx
                 int i;
@@ -497,9 +492,7 @@ static int teletext_close_decoder(AVCodecContext *avctx)
 {
     TeletextContext *ctx = avctx->priv_data;
 
-#ifdef DEBUG
-    av_log(avctx, AV_LOG_DEBUG, "lines_total=%u\n", ctx->lines_processed);
-#endif
+    av_dlog(avctx, "lines_total=%u\n", ctx->lines_processed);
     while (ctx->nb_pages)
         subtitle_rect_free(&ctx->pages[--ctx->nb_pages].sub_rect);
     av_freep(&ctx->pages);



More information about the ffmpeg-cvslog mailing list