[FFmpeg-devel] [PATCH] display warning if rawvideo encoder cannot find codec_tag for the given input format
Peter Ross
pross at xvid.org
Wed Mar 23 13:11:50 CET 2011
---
libavcodec/rawenc.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/libavcodec/rawenc.c b/libavcodec/rawenc.c
index 630df0f..8c8e1d2 100644
--- a/libavcodec/rawenc.c
+++ b/libavcodec/rawenc.c
@@ -35,8 +35,11 @@ static av_cold int raw_init_encoder(AVCodecContext *avctx)
avctx->coded_frame->pict_type = FF_I_TYPE;
avctx->coded_frame->key_frame = 1;
avctx->bits_per_coded_sample = av_get_bits_per_pixel(&av_pix_fmt_descriptors[avctx->pix_fmt]);
- if(!avctx->codec_tag)
+ if(!avctx->codec_tag) {
avctx->codec_tag = avcodec_pix_fmt_to_codec_tag(avctx->pix_fmt);
+ if (!avctx->codec_tag)
+ av_log(avctx, AV_LOG_WARNING, "no codec_tag associated with pix_fmt %i\n", avctx->pix_fmt);
+ }
return 0;
}
--
1.7.4.1
-- Peter
(A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110323/5718967a/attachment.asc>
More information about the ffmpeg-devel
mailing list