Add setting the codecpar->codec_type as well. Fixes detecting stream type

This commit is contained in:
Isaac Connor 2020-05-07 13:44:02 -04:00
parent 40633830d0
commit fcf6eb2631
1 changed files with 3 additions and 0 deletions

View File

@ -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;