]> git.sesse.net Git - nageru/blobdiff - nageru/ffmpeg_capture.cpp
Stop setting nobuffer for FFmpeg inputs; it seems it only really affects buffering...
[nageru] / nageru / ffmpeg_capture.cpp
index 2ecdf64c4096d8db46f11d1eb185ed93f79d2ac0..e5cb096c5720f3eee227fc56a6bc2b03f2fdfba9 100644 (file)
@@ -33,7 +33,7 @@ extern "C" {
 #include "flags.h"
 #include "image_input.h"
 #include "ref_counted_frame.h"
-#include "timebase.h"
+#include "shared/timebase.h"
 
 #define FRAME_SIZE (8 << 20)  // 8 MB.
 
@@ -365,10 +365,7 @@ bool FFmpegCapture::play_video(const string &pathname)
                last_modified = buf.st_mtim;
        }
 
-       AVDictionary *opts = nullptr;
-       av_dict_set(&opts, "fflags", "nobuffer", 0);
-
-       auto format_ctx = avformat_open_input_unique(pathname.c_str(), nullptr, &opts, AVIOInterruptCB{ &FFmpegCapture::interrupt_cb_thunk, this });
+       auto format_ctx = avformat_open_input_unique(pathname.c_str(), nullptr, nullptr, AVIOInterruptCB{ &FFmpegCapture::interrupt_cb_thunk, this });
        if (format_ctx == nullptr) {
                fprintf(stderr, "%s: Error opening file\n", pathname.c_str());
                return false;