Set bits_per_raw_sample when reading j2k frames.
authorCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 12 Sep 2013 07:23:32 +0000 (09:23 +0200)
committerCarl Eugen Hoyos <cehoyos@ag.or.at>
Thu, 12 Sep 2013 07:23:32 +0000 (09:23 +0200)
libavcodec/jpeg2000dec.c

index e67f098..345c7e1 100644 (file)
@@ -350,6 +350,7 @@ static int get_siz(Jpeg2000DecoderContext *s)
                ncomponents > 2 ? s->cdx[2] : 0,
                ncomponents > 2 ? s->cdy[2] : 0);
     }
+    s->avctx->bits_per_raw_sample = s->precision;
     return 0;
 }