# HG changeset patch # User superdump # Date 1237861570 0 # Node ID 26430882ba6e5cc76ff33251009512eb3a84c544 # Parent 8d570fb097f826b4a2674d8e66c15e8b12a2a245 Update apiexample.c to use the newer avcodec_decode_audio2() API. This also fixes compilation. diff -r 8d570fb097f8 -r 26430882ba6e apiexample.c --- 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");