Joe Flowers <joe.flowers@...> writes: > The only thing I did was change the line > codec = avcodec_find_encoder(AV_CODEC_ID_MP2); > to > codec = avcodec_find_encoder(AV_CODEC_ID_PCM_S16LE);
> When I run "./decoding_encoding mp2", it ends with: "Could not > allocate -22 bytes for samples buffer". For PCM codecs, frame_size is 0 and calling av_samples_get_buffer_size() makes no sense. av_samples_get_buffer_size() returns AVERROR(EINVAL) which happens to be "-22". Carl Eugen _______________________________________________ Libav-user mailing list Libav-user@ffmpeg.org http://ffmpeg.org/mailman/listinfo/libav-user