]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/alac.c
gcc chokes on xmm constraints, so pessimize int32_to_float_fmul_scalar_sse a little
[ffmpeg] / libavcodec / alac.c
index 85fb24669b5837258aa0b2ba92fae7842116015c..cb710a634637c77b9623d22f8db6131f0d11c58a 100644 (file)
@@ -536,8 +536,8 @@ static int alac_decode_frame(AVCodecContext *avctx,
     } else {
         /* not compressed, easy case */
         int i, chan;
-        for (chan = 0; chan < channels; chan++)
-            for (i = 0; i < outputsamples; i++) {
+        for (i = 0; i < outputsamples; i++)
+            for (chan = 0; chan < channels; chan++) {
                 int32_t audiobits;
 
                 audiobits = get_bits_long(&alac->gb, alac->setinfo_sample_size);
@@ -594,6 +594,7 @@ static av_cold int alac_decode_init(AVCodecContext * avctx)
 
     alac->numchannels = alac->avctx->channels;
     alac->bytespersample = (avctx->bits_per_sample / 8) * alac->numchannels;
+    avctx->sample_fmt = SAMPLE_FMT_S16;
 
     return 0;
 }
@@ -620,5 +621,5 @@ AVCodec alac_decoder = {
     NULL,
     alac_decode_close,
     alac_decode_frame,
-    .long_name = "ALAC (Apple Lossless Audio Codec)",
+    .long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
 };