[FFmpeg-devel] [PATCH 2/3] Targa encoder: log error message in case the pixel format in input is not supported.

Stefano Sabatini stefano.sabatini-lala
Tue Oct 12 15:23:28 CEST 2010


---
 libavcodec/targaenc.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/libavcodec/targaenc.c b/libavcodec/targaenc.c
index 4eceac7..529c213 100644
--- a/libavcodec/targaenc.c
+++ b/libavcodec/targaenc.c
@@ -116,6 +116,8 @@ static int targa_encode_frame(AVCodecContext *avctx,
         outbuf[16] = 32;         /* bpp */
         break;
     default:
+        av_log(avctx, AV_LOG_ERROR, "Pixel format '%s' not supported.\n",
+               avcodec_get_pix_fmt_name(avctx->pix_fmt));
         return -1;
     }
     bpp = outbuf[16] >> 3;
-- 
1.7.1




More information about the ffmpeg-devel mailing list