mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-12-04 09:34:53 +00:00
Update apiexample.c to use the newer avcodec_decode_audio2() API. This also
fixes compilation. Originally committed as revision 18176 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
cd98a03024
commit
29e455081f
@ -159,7 +159,8 @@ void audio_decode_example(const char *outfilename, const char *filename)
|
||||
|
||||
inbuf_ptr = inbuf;
|
||||
while (size > 0) {
|
||||
len = avcodec_decode_audio(c, (short *)outbuf, &out_size,
|
||||
out_size = AVCODEC_MAX_AUDIO_FRAME_SIZE;
|
||||
len = avcodec_decode_audio2(c, (short *)outbuf, &out_size,
|
||||
inbuf_ptr, size);
|
||||
if (len < 0) {
|
||||
fprintf(stderr, "Error while decoding\n");
|
||||
|
Loading…
Reference in New Issue
Block a user