Audaspace: Fix for ppl with outdated ffmpeg.
authorJoerg Mueller <nexyon@gmail.com>
Mon, 16 Aug 2010 18:13:26 +0000 (18:13 +0000)
committerJoerg Mueller <nexyon@gmail.com>
Mon, 16 Aug 2010 18:13:26 +0000 (18:13 +0000)
intern/audaspace/ffmpeg/AUD_FFMPEGReader.cpp

index b9d5d30436879d3c9dd833ac361cdd73a92bf62e..623e99d5edc10639c01a56c4e708895b783d59d0 100644 (file)
@@ -58,10 +58,15 @@ int AUD_FFMPEGReader::decode(AVPacket* packet, AUD_Buffer& buffer)
 
                // read samples from the packet
                data_size = buf_size - buf_pos;
-               read_length = avcodec_decode_audio3(m_codecCtx,
+               /*read_length = avcodec_decode_audio3(m_codecCtx,
                        (int16_t*)(((data_t*)buffer.getBuffer())+buf_pos),
                        &data_size,
-                       packet);
+                       packet);*/
+               read_length = avcodec_decode_audio2(m_codecCtx,
+                                               (int16_t*)(((data_t*)buffer.getBuffer()) + buf_pos),
+                                               &data_size,
+                                               audio_pkg_data,
+                                               audio_pkg_size);
 
                // read error, next packet!
                if(read_length < 0)