build with ffmpeg version > 59.0.100

This commit is contained in:
Jacek Jendrzej
2021-08-28 15:22:23 +02:00
parent d272cc800f
commit ee09213b50
6 changed files with 23 additions and 1 deletions

View File

@@ -65,6 +65,7 @@
extern "C" {
#include <libavformat/avformat.h>
#include <libavcodec/bsf.h>
}
#if (LIBAVCODEC_VERSION_MAJOR > 55)
@@ -2244,7 +2245,11 @@ bool CStreamRec::Open(CZapitChannel * channel)
#endif
std::string tsfile = std::string(filename) + ".ts";
#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(59,0,100)
AVOutputFormat *ofmt = av_guess_format(NULL, tsfile.c_str(), NULL);
#else
const AVOutputFormat *ofmt = av_guess_format(NULL, tsfile.c_str(), NULL);
#endif
if (ofmt == NULL) {
printf("%s: av_guess_format for [%s] failed!\n", __FUNCTION__, tsfile.c_str());
return false;