From fcf6eb26313eafedc76932c922abcf49f5643f67 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 7 May 2020 13:44:02 -0400 Subject: [PATCH] Add setting the codecpar->codec_type as well. Fixes detecting stream type --- src/zm_sdp.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/zm_sdp.cpp b/src/zm_sdp.cpp index c7bf1b578..15f6ad5e3 100644 --- a/src/zm_sdp.cpp +++ b/src/zm_sdp.cpp @@ -376,6 +376,9 @@ AVFormatContext *SessionDescriptor::generateFormatContext() const { #endif else Warning("Unknown media_type %s", type.c_str()); +#if LIBAVCODEC_VERSION_CHECK(57, 64, 0, 64, 0) + stream->codecpar->codec_type = codec_context->codec_type; +#endif #if LIBAVCODEC_VERSION_CHECK(55, 50, 3, 60, 103) std::string codec_name;