alacdec: Simplify reading of uncompressed samples by using
authorJustin Ruggles <justin.ruggles@gmail.com>
Tue, 3 Mar 2009 04:57:02 +0000 (04:57 +0000)
committerJustin Ruggles <justin.ruggles@gmail.com>
Tue, 3 Mar 2009 04:57:02 +0000 (04:57 +0000)
get_sbits_long().

Originally committed as revision 17744 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/alac.c

index 3a7b080..436329f 100644 (file)
@@ -540,8 +540,7 @@ static int alac_decode_frame(AVCodecContext *avctx,
             for (chan = 0; chan < channels; chan++) {
                 int32_t audiobits;
 
-                audiobits = get_bits_long(&alac->gb, alac->setinfo_sample_size);
-                audiobits = sign_extend(audiobits, alac->setinfo_sample_size);
+                audiobits = get_sbits_long(&alac->gb, alac->setinfo_sample_size);
 
                 alac->outputsamples_buffer[chan][i] = audiobits;
             }