X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffmpeg_raii.h;h=c0c4a47dc170aa954862eacaa56eb9326cb739d2;hb=96cb6414f85e0ef4d660b7bd56267303e80fcd05;hp=0b112345d59727ca83728e638135bb3a0ab41159;hpb=778a9bccf11b06d077eea4b32ccc0baf1e8cf01b;p=nageru diff --git a/ffmpeg_raii.h b/ffmpeg_raii.h index 0b11234..c0c4a47 100644 --- a/ffmpeg_raii.h +++ b/ffmpeg_raii.h @@ -18,7 +18,7 @@ struct AVDictionary; struct AVFormatContext; struct AVFrame; struct AVInputFormat; - +struct SwsContext; // AVFormatContext struct avformat_close_input_unique { @@ -62,4 +62,12 @@ typedef std::unique_ptr AVFrameWithDeleter av_frame_alloc_unique(); +// SwsContext +struct sws_free_context_unique { + void operator() (SwsContext *context) const; +}; + +typedef std::unique_ptr + SwsContextWithDeleter; + #endif // !defined(_FFMPEG_RAII_H)