I built a class with the use of the FFmpeg API to decode several audio files (mp3, ogg, G.729, etc) and load them into a data structure as raw audio data. Now for example when I run the following code:
codec = avcodec_find_decoder(AV_CODEC_ID_G729);
if (codec == NULL){
printf("Codec not found");
exit(1);
}
The program will indeed output the error message, but if I load mp3 or ogg codecs there's no issue.
So to double check I executed in the terminal ffmpeg -decoders
to see if the decoder is supported (which I also checked online) and outputs:
A....D g729 G.729
I need the decoder for G.729. Is there anything I'm missing or doing something wrong? Is there a different way to load this decoder? Any suggestions would be greatly appreciated.
The FFmpeg version installed is 2.7.1 on a Debian system
API use example: https://www.ffmpeg.org/doxygen/2.7/decoding_encoding_8c-example.html