Targa encoder: log error message in case the pixel format in input is
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 12 Oct 2010 18:44:25 +0000 (18:44 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Tue, 12 Oct 2010 18:44:25 +0000 (18:44 +0000)
not supported.

Originally committed as revision 25454 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/targaenc.c

index e5d0042..325df46 100644 (file)
@@ -113,6 +113,8 @@ static int targa_encode_frame(AVCodecContext *avctx,
         outbuf[16] = 24;         /* 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;