[Libav-user] Why (c->frame_size = 0) ?
Paul B Mahol
onemda at gmail.com
Mon Feb 25 19:53:02 CET 2013
On 2/25/13, Joe Flowers <joe.flowers at nofreewill.com> wrote:
> In the decoding_encoding.c file, I have changed
>
>
> codec = avcodec_find_encoder(AV_CODEC_ID_MP2);
> to
> codec = avcodec_find_encoder(AV_CODEC_ID_PCM_S16LE);
>
>
> but now I get
>
>
> "Could not allocate -22 bytes for samples buffer"
>
> back from
>
> buffer_size = av_samples_get_buffer_size(NULL, c->channels,
> c->frame_size, c->sample_fmt, 0);
>
>
> Anyone know how I can fix this problem?
Without exact source code? Unlikely.
>
> Thanks!
>
> Joe
>
> ----------------------------------------------------
> //For AV_CODEC_ID_PCM_S16LE:
> //c->channels = (2).
> //c->frame_size = (0).
looks wrong.
> //c->sample_fmt = (1).
looks wrong.
>
> //For AV_CODEC_ID_MP2:
> //c->channels = (2).
> //c->frame_size = (1152).
> //c->sample_fmt = (1).
looks wrong.
> -----------------------------------------------------
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
More information about the Libav-user
mailing list