#include <libavformat/avformat.h>
#include <libswresample/swresample.h>
#include <libavutil/avutil.h>
-#include <libavutil/frame.h>
}
struct AVCodecContextDeleter {
void operator() (AVCodecContext *ctx) {
- avcodec_free_context(&ctx);
+ avcodec_close(ctx);
+ av_freep(&ctx);
}
};