On Wed, 1 Aug 2012 20:39:36 +0100, Kieran Kunhya wrote:
> > +/* the codec gives us the frame size, in samples,
> > + * we calculate the size of the samples buffer in bytes */
> > +buffer_size = av_samples_get_buffer_size(NULL, c->channels,
> > c->frame_size,
> > +
> +/* the codec gives us the frame size, in samples,
> + * we calculate the size of the samples buffer in bytes */
> +buffer_size = av_samples_get_buffer_size(NULL, c->channels,
> c->frame_size,
> + c->sample_fmt, 0);
> +samples = av_mall
On 07/31/2012 02:24 PM, Anton Khirnov wrote:
> @@ -72,6 +75,8 @@ static void audio_encode_example(const char *filename)
> c->bit_rate = 64000;
> c->sample_rate = 44100;
> c->channels = 2;
> +c->channel_layout = AV_CH_LAYOUT_STEREO;
> +c->sample_fmt = AV_SAMPLE_FMT_S16;
>
>
---
libavcodec/api-example.c | 67 --
1 file changed, 53 insertions(+), 14 deletions(-)
diff --git a/libavcodec/api-example.c b/libavcodec/api-example.c
index 93d6c22..9f633d9 100644
--- a/libavcodec/api-example.c
+++ b/libavcodec/api-example.c
@@ -37