]> git.sesse.net Git - vlc/commitdiff
WMAPro: increase the i_output_max to have a proper decoding
authorJean-Baptiste Kempf <jb@videolan.org>
Wed, 2 Sep 2009 18:48:40 +0000 (20:48 +0200)
committerJean-Baptiste Kempf <jb@videolan.org>
Wed, 2 Sep 2009 20:25:18 +0000 (22:25 +0200)
modules/codec/avcodec/audio.c

index b587c7c85083fdb2b9b8b06debaf3d2414e9a3c0..687bd040d40f630f33a3254aad8f651cced5e4cd 100644 (file)
@@ -186,11 +186,14 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
         p_sys->i_output_max = 8 * sizeof(int32_t) * 131072;
         break;
     case CODEC_ID_TTA:
-        p_sys->i_output_max = p_sys->p_context->channels * sizeof(int32_t) * p_sys->p_context->sample_rate * 2;
+        p_sys->i_output_max = p_sys->p_context->channels * sizeof(int33_t) * p_sys->p_context->sample_rate * 2;
         break;
     case CODEC_ID_FLAC:
         p_sys->i_output_max = 8 * sizeof(int32_t) * 65535;
         break;
+    case CODEC_ID_WMAPRO:
+        p_sys->i_output_max = 8 * sizeof(float) * 6145; /* (1 << 12) * 3/2 */
+        break;
     default:
         p_sys->i_output_max = 0;
         break;