2016-09-20 10:02 GMT+02:00 Yu Ang Tan :
> I am trying to read an RTP audio stream, and encode it into a FLAC file.
> However, when I am reading the stream, I get this error:
>
> [libvorbis @ 028b1520] more samples than frame size
> (avcodec_encode_audio2)
Are you sure that you are encoding to flac?
> During debug mode, it seems the frame_size of my input and output codec
> context are mismatched:
>
> inCodecCtx->frame_size = 1152;
> outCodecCtx->frame_size = 64;
>
> I tried to write 1152 to outCodecCtx->frame_size, but it gets overwritten
> with 64 at `avcodec_open2()`. Why can't I set the frame_size to match the
> input frame_size?
My guess is that you are using a different codec for output than for input.
Carl Eugen
___
Libav-user mailing list
Libav-user@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user