Mercurial > libavcodec.hg
changeset 9255:26430882ba6e libavcodec
Update apiexample.c to use the newer avcodec_decode_audio2() API. This also
fixes compilation.
author | superdump |
---|---|
date | Tue, 24 Mar 2009 02:26:10 +0000 |
parents | 8d570fb097f8 |
children | eb5f74d90304 |
files | apiexample.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/apiexample.c Tue Mar 24 01:17:55 2009 +0000 +++ b/apiexample.c Tue Mar 24 02:26:10 2009 +0000 @@ -159,7 +159,8 @@ 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");