Skip to content

Commit

Permalink
Disable AVC codec support by default for 6.1 release (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanSalmanpour authored Feb 27, 2024
1 parent a48fc69 commit eced987
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/parser/rocparser_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ rocDecCreateVideoParser(RocdecVideoParser *parser_handle, RocdecParserParams *pa
if (parser_handle == nullptr || parser_params == nullptr) {
return ROCDEC_INVALID_PARAMETER;
}

const char *is_avc_enabled = std::getenv("ROCDECODE_ENABLE_AVC");
if (parser_params->codec_type != rocDecVideoCodec_HEVC &&
(parser_params->codec_type == rocDecVideoCodec_AVC && (is_avc_enabled == nullptr || std::string(is_avc_enabled) != "1"))) {
ERR("The current version of rocDecode officially supports only the H.265 (HEVC) codec.");
return ROCDEC_NOT_IMPLEMENTED;
}

RocdecVideoParser handle = nullptr;
try {
handle = new RocParserHandle(parser_params);
Expand Down

0 comments on commit eced987

Please sign in to comment.