Dear Developer, I have an understanding question. If I initialing a AVFrame with PCM Data like this:
error = avcodec_fill_audio_frame(
output_frame,
2,
AV_SAMPLE_FMT_FLTP,
(uint8_t*)output_frame_data,
frame_size * sizeof(float),
0);
I always get an error. -22, which means illegal argument. Frame_size *
sizeof(float) is 4608 Bytes (1152 FrameSize * 4 Byte), which is the size for a
MP3-Frame. My input is PCM Stereo. But why do I get this error? A FrameSize for
mp3 is 1152. FLTP means, ok, 2 channels, float and a 2 dimensional array of
bytes (right?). But how to initiate right? If I use:
error = avcodec_fill_audio_frame(
output_frame,
2,
AV_SAMPLE_FMT_FLTP,
(uint8_t*)output_frame_data,
2 * frame_size * sizeof(float),
0);
It works, but then the encoder
ret = avcodec_send_frame(_CodecContext, output_frame);
Returns with -22 (illegal argument). I am confused. How to send the frames in a
right way to the encoder? The PCM data I read from an AVFifo as suggested by
transcoder_aac.c.
Thanks!
Regards,
Sven
signature.asc
Description: Message signed with OpenPGP
_______________________________________________ Libav-user mailing list [email protected] https://ffmpeg.org/mailman/listinfo/libav-user To unsubscribe, visit link above, or email [email protected] with subject "unsubscribe".
