[FFmpeg-cvslog] avcodec/dvbsubdec: Replace fprintf(stderr) by av_log()

Michael Niedermayer git at videolan.org
Thu Apr 6 01:00:59 EEST 2017


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Mon Apr  3 22:18:14 2017 +0200| [b02027c79d4b504fccc948c9de17ef65253b81b6] | committer: Michael Niedermayer

avcodec/dvbsubdec: Replace fprintf(stderr) by av_log()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavcodec/dvbsubdec.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index b22c7ca..446371e 100644
--- a/libavcodec/dvbsubdec.c
+++ b/libavcodec/dvbsubdec.c
@@ -1332,7 +1332,7 @@ static int dvbsub_parse_page_segment(AVCodecContext *avctx,
 
 
 #ifdef DEBUG
-static void png_save(const char *filename, uint32_t *bitmap, int w, int h)
+static void png_save(DVBSubContext *ctx, const char *filename, uint32_t *bitmap, int w, int h)
 {
     int x, y, v;
     FILE *f;
@@ -1382,13 +1382,13 @@ static void png_save(const char *filename, uint32_t *bitmap, int w, int h)
 
     snprintf(command, sizeof(command), "pnmtopng -alpha %s %s > %s.png 2> /dev/null", fname2, fname, filename);
     if (system(command) != 0) {
-        fprintf(stderr, "Error running pnmtopng\n");
+        av_log(ctx, AV_LOG_ERROR, "Error running pnmtopng\n");
         return;
     }
 
     snprintf(command, sizeof(command), "rm %s %s", fname, fname2);
     if (system(command) != 0) {
-        fprintf(stderr, "Error removing %s and %s\n", fname, fname2);
+        av_log(ctx, AV_LOG_ERROR, "Error removing %s and %s\n", fname, fname2);
         return;
     }
 }
@@ -1486,7 +1486,7 @@ static int save_display_set(DVBSubContext *ctx)
 
         snprintf(filename, sizeof(filename), "dvbs.%d", fileno_index);
 
-        png_save(filename, pbuf, width, height);
+        png_save(ctx, filename, pbuf, width, height);
 
         av_freep(&pbuf);
     }



More information about the ffmpeg-cvslog mailing list