From 2be5e5e16845cdcf2f80383b1329808558e98c87 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Tue, 4 Jun 2019 13:42:46 -0500 Subject: [PATCH] Fixing crash on certain hardware accelerator modes (specifically decoder 2, device 0) --- src/FFmpegReader.cpp | 4 +--- src/examples/Example.cpp | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index e8f135ce..6aa0938e 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -934,9 +934,7 @@ std::shared_ptr FFmpegReader::ReadStream(int64_t requested_frame) { // down processing considerably, but might be more stable on some systems. #pragma omp taskwait } - } else { - RemoveAVFrame(pFrame); - } + } } // Audio packet diff --git a/src/examples/Example.cpp b/src/examples/Example.cpp index 80339684..1e19f4d9 100644 --- a/src/examples/Example.cpp +++ b/src/examples/Example.cpp @@ -38,7 +38,7 @@ int main(int argc, char* argv[]) { Settings *s = Settings::Instance(); s->HARDWARE_DECODER = 2; // 1 VA-API, 2 NVDEC - s->HW_DE_DEVICE_SET = 1; + s->HW_DE_DEVICE_SET = 0; FFmpegReader r9("/home/jonathan/Videos/sintel_trailer-720p.mp4"); r9.Open();