From 3f3b85bdbeb85493616d7ab2125de7ffbd97fd5e Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Wed, 17 Jul 2019 18:03:59 +0200 Subject: [PATCH] api ffmpeg, renamed hls format Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/2fea61e3a2cc840bb2fda3d7e8ade8b58c6367c5 Author: Jacek Jendrzej Date: 2019-07-17 (Wed, 17 Jul 2019) --- src/driver/record.cpp | 7 ++++++- src/driver/streamts.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/driver/record.cpp b/src/driver/record.cpp index 6ba50a32e..35a8ef9cf 100644 --- a/src/driver/record.cpp +++ b/src/driver/record.cpp @@ -2285,7 +2285,12 @@ bool CStreamRec::Open(CZapitChannel * channel) printf("%s: Cannot find stream info [%s]!\n", __FUNCTION__, channel->getUrl().c_str()); return false; } - if (!strstr(ifcx->iformat->name, "applehttp") && +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,27,102) + const char *hls = "applehttp"; +#else + const char *hls = "hls"; +#endif + if (!strstr(ifcx->iformat->name, hls) && !strstr(ifcx->iformat->name, "mpegts") && !strstr(ifcx->iformat->name, "matroska") && !strstr(ifcx->iformat->name, "avi") && diff --git a/src/driver/streamts.cpp b/src/driver/streamts.cpp index 43b6dc3dd..ca21d116d 100644 --- a/src/driver/streamts.cpp +++ b/src/driver/streamts.cpp @@ -845,7 +845,12 @@ bool CStreamStream::Open() printf("%s: Cannot find stream info [%s]!\n", __FUNCTION__, channel->getUrl().c_str()); return false; } - if (!strstr(ifcx->iformat->name, "applehttp") && +#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,27,102) + const char *hls = "applehttp"; +#else + const char *hls = "hls"; +#endif + if (!strstr(ifcx->iformat->name, hls) && !strstr(ifcx->iformat->name, "mpegts") && !strstr(ifcx->iformat->name, "matroska") && !strstr(ifcx->iformat->name, "avi") &&