[FFmpeg-cvslog] avcodec/huffyuvenc: init bps from pixel descriptor

Michael Niedermayer git at videolan.org
Thu Jan 16 17:13:52 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jan 13 01:13:29 2014 +0100| [6c004e8aada00d96f5c38e50c9770efb1eaaaa59] | committer: Michael Niedermayer

avcodec/huffyuvenc: init bps from pixel descriptor

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6c004e8aada00d96f5c38e50c9770efb1eaaaa59
---

 libavcodec/huffyuvenc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/huffyuvenc.c b/libavcodec/huffyuvenc.c
index 5224480..bd633a2 100644
--- a/libavcodec/huffyuvenc.c
+++ b/libavcodec/huffyuvenc.c
@@ -188,7 +188,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
     avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
     avctx->coded_frame->key_frame = 1;
 
-    s->bps = 8;
+    s->bps = desc->comp[0].depth_minus1 + 1;
     s->yuv = !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2;
     s->chroma = desc->nb_components > 2;
     s->alpha = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA);



More information about the ffmpeg-cvslog mailing list