]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/cfhd: set correct bits_per_raw_sample
authorPaul B Mahol <onemda@gmail.com>
Sun, 2 Aug 2020 06:39:37 +0000 (08:39 +0200)
committerPaul B Mahol <onemda@gmail.com>
Sun, 2 Aug 2020 07:33:24 +0000 (09:33 +0200)
libavcodec/cfhd.c

index 00e15f93a103cd92159afb5f34a3ae1f1bb14b14..60bba9ff814c06032a715d5b742b416be3a4817b 100644 (file)
@@ -44,7 +44,6 @@ static av_cold int cfhd_init(AVCodecContext *avctx)
 {
     CFHDContext *s = avctx->priv_data;
 
-    avctx->bits_per_raw_sample = 10;
     s->avctx                   = avctx;
 
     return ff_cfhd_init_vlcs(s);
@@ -555,7 +554,7 @@ static int cfhd_decode(AVCodecContext *avctx, void *data, int *got_frame,
                 ret = AVERROR(EINVAL);
                 break;
             }
-            s->bpc = data;
+            avctx->bits_per_raw_sample = s->bpc = data;
         } else if (tag == EncodedFormat) {
             av_log(avctx, AV_LOG_DEBUG, "Sample format? %i\n", data);
             if (data == 1) {