Fix compile on old ffmpeg

This commit is contained in:
Isaac Connor 2020-06-23 14:43:11 -04:00
parent 4e2732e12d
commit 2c056c188f
1 changed files with 2 additions and 0 deletions

View File

@ -980,10 +980,12 @@ int FfmpegCamera::CaptureAndRecord(
return -1; return -1;
} }
#if HAVE_LIBAVUTIL_HWCONTEXT_H #if HAVE_LIBAVUTIL_HWCONTEXT_H
#if LIBAVCODEC_VERSION_CHECK(57, 89, 0, 89, 0)
if ( (ret == AVERROR_INVALIDDATA ) && (hw_pix_fmt != AV_PIX_FMT_NONE) ) { if ( (ret == AVERROR_INVALIDDATA ) && (hw_pix_fmt != AV_PIX_FMT_NONE) ) {
use_hwaccel = false; use_hwaccel = false;
return -1; return -1;
} }
#endif
#endif #endif
} }
zm_av_packet_unref(&packet); zm_av_packet_unref(&packet);