]> git.sesse.net Git - nageru/blobdiff - ffmpeg_raii.cpp
More refactoring in FFmpegCapture.
[nageru] / ffmpeg_raii.cpp
index b57de95124b18d2951263e489703592c2f0ae62a..a11075f81d0d8b84e6c17380e15c82683e476d41 100644 (file)
@@ -5,6 +5,7 @@ extern "C" {
 #include <libavformat/avformat.h>
 #include <libavutil/dict.h>
 #include <libavutil/frame.h>
+#include <libswscale/swscale.h>
 }
 
 using namespace std;
@@ -59,3 +60,9 @@ AVFrameWithDeleter av_frame_alloc_unique()
        return AVFrameWithDeleter(av_frame_alloc());
 }
 
+// SwsContext
+
+void sws_free_context_unique::operator() (SwsContext *context) const
+{
+       sws_freeContext(context);
+}