]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/wavpack.c
ARM: intmath: use native-size return types for clipping functions
[ffmpeg] / libavcodec / wavpack.c
index 6eb913fa6461eb408f6036b241987c8d90e7ebd1..eafb40d63902aa8b782b68f04a05eeacc1553507 100644 (file)
@@ -428,7 +428,7 @@ static float wv_get_value_float(WavpackFrameContext *s, uint32_t *crc, int S)
         uint32_t u;
     } value;
 
-    int sign;
+    unsigned int sign;
     int exp = s->float_max_exp;
 
     if (s->got_extra_bits) {
@@ -1202,6 +1202,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
         avctx->sample_fmt = AV_SAMPLE_FMT_S16;
     } else {
         avctx->sample_fmt = AV_SAMPLE_FMT_S32;
+        avctx->bits_per_raw_sample = ((frame_flags & 0x03) + 1) << 3;
     }
 
     /* get output buffer */
@@ -1248,7 +1249,7 @@ static int wavpack_decode_frame(AVCodecContext *avctx, void *data,
 AVCodec ff_wavpack_decoder = {
     .name           = "wavpack",
     .type           = AVMEDIA_TYPE_AUDIO,
-    .id             = CODEC_ID_WAVPACK,
+    .id             = AV_CODEC_ID_WAVPACK,
     .priv_data_size = sizeof(WavpackContext),
     .init           = wavpack_decode_init,
     .close          = wavpack_decode_end,