[FFmpeg-cvslog] avcodec/ffv1enc: fix assertion failure with unset bits per raw sample

Michael Niedermayer git at videolan.org
Tue Aug 4 12:57:59 CEST 2015


ffmpeg | branch: release/2.7 | Michael Niedermayer <michael at niedermayer.cc> | Mon Jul 20 02:10:04 2015 +0200| [b1863e3d948474cfca995c34209912f3c8a3a753] | committer: Carl Eugen Hoyos

avcodec/ffv1enc: fix assertion failure with unset bits per raw sample

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 749f85496ccff345ec811976ce45ec9e1900e9a8)

Fixes ticket #4751.

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

 libavcodec/ffv1enc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 45ab3a3..a47a64d 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -755,6 +755,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
         s->transparency = desc->nb_components == 4;
         if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
             s->bits_per_raw_sample = 8;
+        else if (!s->bits_per_raw_sample)
+            s->bits_per_raw_sample = 8;
         break;
     case AV_PIX_FMT_RGB32:
         s->colorspace = 1;



More information about the ffmpeg-cvslog mailing list