avformat_open_input
-
FFmpeg으로 미디어 스트림 열기Streaming Media/Media Tools 2013. 6. 19. 13:34
예제 코드 static AVFormatContext *fmt_ctx = NULL; void open_input_file() { avformat_open_input(&fmt_ctx, filename, NULL, NULL); for (i = 0; i nb_streams; i++) { AVStream *st = fmt_ctx->streams[i]; AVCodec *dec; avcodec_open2(st->codec, dec, NULL); } } void close_input_file() { for (i = 0; i nb_streams; i++) { AVStream *st = fmt_ctx->streams[i]; avcodec_close(st->codec); } avfor..