aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-11-12 16:22:48 +0000
committertrialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38>2007-11-12 16:22:48 +0000
commitbfabba0454037c8817ed192dc110c4237888bae8 (patch)
treeae95a09a239ef5493148f45395792f3e208b704b
parent1e7a7fdfdf6859e016cc715aace8d0ecb0e3a761 (diff)
downloadqmmp-bfabba0454037c8817ed192dc110c4237888bae8.tar.gz
qmmp-bfabba0454037c8817ed192dc110c4237888bae8.tar.bz2
qmmp-bfabba0454037c8817ed192dc110c4237888bae8.zip
replaced deprecated function
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@181 90c681e8-e032-0410-971d-27865f9a5e38
-rw-r--r--lib/qmmp/Input/ffmpeg/decoder_ffmpeg.cpp4
-rw-r--r--lib/qmmp/Input/ffmpeg/decoder_ffmpeg.h4
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.cpp b/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.cpp
index 49d3a4d66..a23a470a9 100644
--- a/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.cpp
+++ b/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.cpp
@@ -262,9 +262,11 @@ void DecoderFFmpeg::run()
inbuf_ptr = pkt.data;
out_size = 0;
+
while (size > 0)
{
- l = avcodec_decode_audio(c, (int16_t *)(wma_outbuf), &out_size, inbuf_ptr, size);
+ out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE*sizeof(int16_t);
+ l = avcodec_decode_audio2(c, (int16_t *)(wma_outbuf), &out_size, inbuf_ptr, size);
if(l < 0)
goto end;
diff --git a/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.h b/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.h
index 412d43f0f..956e5f32b 100644
--- a/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.h
+++ b/lib/qmmp/Input/ffmpeg/decoder_ffmpeg.h
@@ -63,7 +63,7 @@ private:
AVFormatContext *ic;
AVCodecContext *c;
- int wma_st_buff, wma_idx, wma_idx2;
+ uint wma_st_buff, wma_idx, wma_idx2;
uint8_t *wma_outbuf;
unsigned int bks;
@@ -75,4 +75,4 @@ private:
};
-#endif // __decoder_mpc_h
+#endif // __decoder_ffmpeg_h