Skip to content

Instantly share code, notes, and snippets.

@kepstin
Created May 20, 2016 20:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kepstin/f94e33d783a8a82b9540dd0c8cafcc83 to your computer and use it in GitHub Desktop.
Save kepstin/f94e33d783a8a82b9540dd0c8cafcc83 to your computer and use it in GitHub Desktop.
#include <libavformat/avformat.h>
#include <libavcodec/avcodec.h>
#include <stdio.h>
void main(void) {
av_register_all();
/* Search for the 'rtp' output format */
AVOutputFormat *format = av_oformat_next(NULL);
while ((format = av_oformat_next(format)) != NULL) {
printf("%s\n", format->name);
if (strcmp(format->name, "rtp") == 0)
break;
}
if (format == NULL) {
fprintf(stderr, "Couldn't locate rtp AVOutputFormat\n");
exit(1);
}
int query = avformat_query_codec(format, AV_CODEC_ID_OPUS, FF_COMPLIANCE_NORMAL);
printf("format query for opus in rtp: %d\n", query);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment