Skip to content

Commit

Permalink
Fix for ffmpeg4
Browse files Browse the repository at this point in the history
  • Loading branch information
mthrok committed Jun 1, 2023
1 parent db9cc48 commit 0f69178
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions torchaudio/csrc/ffmpeg/libav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
#include <torchaudio/csrc/ffmpeg/libav.h>

extern "C" {
#include <libavcodec/version_major.h>
#include <libavdevice/version_major.h>
#include <libavfilter/version_major.h>
#include <libavformat/version_major.h>
#include <libavcodec/version.h>
#include <libavdevice/version.h>
#include <libavfilter/version.h>
#include <libavformat/version.h>
#include <libavutil/version.h>
}

Expand Down
6 changes: 5 additions & 1 deletion torchaudio/csrc/ffmpeg/macro.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#pragma once

extern "C" {
#include <libavformat/version_major.h>
#include <libavformat/version.h>
}

#ifndef LIBAVFORMAT_VERSION_MAJOR
#error LIBAVFORMAT_VERSION_MAJOR is not defined.
#endif

#if LIBAVFORMAT_VERSION_MAJOR >= 59
#define AVFORMAT_CONST const
#else
Expand Down

0 comments on commit 0f69178

Please sign in to comment.