[FFmpeg-cvslog] avcodec/ffv1enc: fix bps for >8bit yuv when not explicitly set

Michael Niedermayer git at videolan.org
Thu Jun 18 01:02:37 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Jun 18 00:34:59 2015 +0200| [3a6a8f6ee1cb619913b87b6c78e0436303e2a35f] | committer: Michael Niedermayer

avcodec/ffv1enc: fix bps for >8bit yuv when not explicitly set

Fixes Ticket4636

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

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

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

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index af727a5..45ab3a3 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -753,7 +753,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
         s->chroma_planes = desc->nb_components < 3 ? 0 : 1;
         s->colorspace = 0;
         s->transparency = desc->nb_components == 4;
-        if (!avctx->bits_per_raw_sample)
+        if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
             s->bits_per_raw_sample = 8;
         break;
     case AV_PIX_FMT_RGB32:



More information about the ffmpeg-cvslog mailing list