]> git.sesse.net Git - nageru/blobdiff - nageru/audio_encoder.h
Move to FFmpeg 4.0 APIs, fixing the deprecation warnings.
[nageru] / nageru / audio_encoder.h
index d28d7eee3c04ff1d0ee89ac38e62cdae22260402..3a47f99afb0c3fe2cc792af12152312919017b39 100644 (file)
@@ -11,7 +11,7 @@
 extern "C" {
 #include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
-#include <libavresample/avresample.h>
+#include <libswresample/swresample.h>
 #include <libavutil/frame.h>
 }
 
@@ -39,7 +39,7 @@ private:
        int64_t last_pts = 0;  // The first pts after all audio we've encoded.
 
        AVCodecContext *ctx;
-       AVAudioResampleContext *resampler;
+       SwrContext *resampler;
        AVFrame *audio_frame = nullptr;
        std::vector<Mux *> muxes;
 };