diff --git a/src/Extension/Frame.cpp b/src/Extension/Frame.cpp index 05eaee3e..2c204e19 100644 --- a/src/Extension/Frame.cpp +++ b/src/Extension/Frame.cpp @@ -39,7 +39,7 @@ Frame::Ptr Frame::getCacheAbleFrame(const Frame::Ptr &frame){ } #define SWITCH_CASE(codec_id) case codec_id : return #codec_id -char *CodecInfo::getCodecName() { +const char *CodecInfo::getCodecName() { switch (getCodecId()) { SWITCH_CASE(CodecH264); SWITCH_CASE(CodecH265); diff --git a/src/Extension/Frame.h b/src/Extension/Frame.h index 4819c5f1..66218b0c 100644 --- a/src/Extension/Frame.h +++ b/src/Extension/Frame.h @@ -77,7 +77,7 @@ public: * 获取编码器名称 * @return 编码器名称 */ - char *getCodecName(); + const char *getCodecName(); }; /**