summaryrefslogtreecommitdiff
path: root/libavcodec/dvbsubdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-04-03 22:18:14 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-05 23:57:08 +0200
commitb02027c79d4b504fccc948c9de17ef65253b81b6 (patch)
tree8785aec39df205eed570ccef06ecaeef3524edd8 /libavcodec/dvbsubdec.c
parentc901ae944040855e05b25f8d81be6b6f327ce2a4 (diff)
avcodec/dvbsubdec: Replace fprintf(stderr) by av_log()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/dvbsubdec.c')
-rw-r--r--libavcodec/dvbsubdec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
index b22c7ca233..446371e811 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);
}