From 64278128d8d5315a19da6d319517c48fa97da3f4 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 21 Dec 2013 18:04:16 +0100 Subject: video/fmt-conversion.c: remove unknown pixel format messages This removes the messages printed on unknown pixel format messages. Passing a mp_log to them would be too messy. Actually, this is a good change, because in the past we often had trouble with these messages printed too often (causing terminal spam etc.), and printing warnings or error messages on the caller sides is much cleaner. vd_lavc.c had a change earlier to print an error message if a decoder outputs an unsupported pixel format. --- video/image_writer.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'video/image_writer.c') diff --git a/video/image_writer.c b/video/image_writer.c index 7e725fe729..e921cb7995 100644 --- a/video/image_writer.c +++ b/video/image_writer.c @@ -107,6 +107,11 @@ static int write_lavc(struct image_writer_ctx *ctx, mp_image_t *image, FILE *fp) avctx->width = image->w; avctx->height = image->h; avctx->pix_fmt = imgfmt2pixfmt(image->imgfmt); + if (avctx->pix_fmt == AV_PIX_FMT_NONE) { + MP_ERR(ctx, "Image format %s not supported by lavc.\n", + mp_imgfmt_to_name(image->imgfmt)); + goto error_exit; + } if (ctx->writer->lavc_codec == AV_CODEC_ID_PNG) { avctx->compression_level = ctx->opts->png_compression; avctx->prediction_method = ctx->opts->png_filter; -- cgit v1.2.3