hi !!
i run fobs-src/lib/samples/test with ./test samples.mov 123
i give 2 argument because i want it to run line 48 if(argc > 2) error = d.setFrameByTime(10.0);
i get a error message [pcm_u8 @ 0x8499828]buffer smaller than AVCODEC_MAX_AUDIO_FRAME_SIZE
then i modify the code
ReturnCode Decoder::decodeAudioFrame() { ReturnCode error = testOpen(); int data_size = 0; //short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2]; uint8_t *samples = decodedAudioFrame; AVPacket *pkt = audioBuffer->extractNext(); ................... }
with
ReturnCode Decoder::decodeAudioFrame() { ReturnCode error = testOpen(); int data_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; // <===change here //short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2]; uint8_t *samples = decodedAudioFrame; AVPacket *pkt = audioBuffer->extractNext(); ................... }
then it's work
ps. i am sorry for my english
sorry i forget to say that i am use fobs-src-0.4.1
Log in to post a comment.
hi !!
i run fobs-src/lib/samples/test with
./test samples.mov 123
i give 2 argument because i want it to run line 48
if(argc > 2) error = d.setFrameByTime(10.0);
i get a error message
[pcm_u8 @ 0x8499828]buffer smaller than AVCODEC_MAX_AUDIO_FRAME_SIZE
then i modify the code
ReturnCode Decoder::decodeAudioFrame()
{
ReturnCode error = testOpen();
int data_size = 0;
//short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2];
uint8_t *samples = decodedAudioFrame;
AVPacket *pkt = audioBuffer->extractNext();
...................
}
with
ReturnCode Decoder::decodeAudioFrame()
{
ReturnCode error = testOpen();
int data_size = AVCODEC_MAX_AUDIO_FRAME_SIZE; // <===change here
//short samples[AVCODEC_MAX_AUDIO_FRAME_SIZE / 2];
uint8_t *samples = decodedAudioFrame;
AVPacket *pkt = audioBuffer->extractNext();
...................
}
then it's work
ps. i am sorry for my english
sorry i forget to say that i am use fobs-src-0.4.1