deps/media-playback: Fix compilation with older FFmpeg versions
Fixes an issue where media-playback would not compile with older FFmpeg versions due to the fact that the AV_PIX_FMT_VIDEOTOOLBOX was unavailable until version 54.31.100 of libavutil (FFmpeg 2.8). Fixes mantis issue 1045. Closes jp9000/obs-studio#1089
This commit is contained in:
2
deps/media-playback/media-playback/decode.c
vendored
2
deps/media-playback/media-playback/decode.c
vendored
@@ -24,7 +24,7 @@ static AVCodec *find_hardware_decoder(enum AVCodecID id)
|
||||
|
||||
while (hwa) {
|
||||
if (hwa->id == id) {
|
||||
if (hwa->pix_fmt == AV_PIX_FMT_VIDEOTOOLBOX ||
|
||||
if (hwa->pix_fmt == AV_PIX_FMT_VDTOOL ||
|
||||
hwa->pix_fmt == AV_PIX_FMT_DXVA2_VLD ||
|
||||
hwa->pix_fmt == AV_PIX_FMT_VAAPI_VLD) {
|
||||
c = avcodec_find_decoder_by_name(hwa->name);
|
||||
|
6
deps/media-playback/media-playback/decode.h
vendored
6
deps/media-playback/media-playback/decode.h
vendored
@@ -44,6 +44,12 @@ extern "C" {
|
||||
#define CODEC_FLAG_TRUNC CODEC_FLAG_TRUNCATED
|
||||
#endif
|
||||
|
||||
#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(54, 31, 100)
|
||||
#define AV_PIX_FMT_VDTOOL AV_PIX_FMT_VIDEOTOOLBOX
|
||||
#else
|
||||
#define AV_PIX_FMT_VDTOOL AV_PIX_FMT_VDA_VLD
|
||||
#endif
|
||||
|
||||
struct mp_media;
|
||||
|
||||
struct mp_decode {
|
||||
|
Reference in New Issue
Block a user