Btw, this looks a bit suspicious? AVFilterFormats *ff_all_samplerates(void) { AVFilterFormats *ret = av_mallocz(sizeof(*ret)); return ret; } AVFilterChannelLayouts *ff_all_channel_layouts(void) { AVFilterChannelLayouts *ret = av_mallocz(sizeof(*ret)); return ret; }