В этой библиотеке есть структуры для хранения данных, которые необходимо создавать с использованием определенных методов распределения.Например:
Код: Выделить всё
AVPacket* packet = av_packet_alloc();
AVCodecContext* cdcContext = avcodec_alloc_context3(/* SOME PARAMETERS */)
AVFormatContext* fmtContext = avformat_alloc_context();
Например, это:
Код: Выделить всё
AVFormatContext* fmtContext = avformat_alloc_context();
avformat_find_stream_info(fmtContext, NULL);
Код: Выделить всё
FormatContext* fmtContext = new FormatContext();
fmtContext->findStreamInfo(NULL);
Код: Выделить всё
struct Foo {
int a;
int b;
int c;
}
void printFoo(Foo* foo) {
std::cout a
Подробнее здесь: [url]https://stackoverflow.com/questions/78679861/inheriting-structs-in-c[/url]
Мобильная версия