Skip to content

Commit d3dfc4f

Browse files
kiritigowdaWBobby
authored andcommitted
Samples: Video batch decode - FFMPEG Multiversion support (#402)
1 parent 9d44600 commit d3dfc4f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

samples/videoDecodeBatch/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,12 @@ if(HIP_FOUND AND FFMPEG_FOUND AND ROCDECODE_FOUND)
9090
add_executable(${PROJECT_NAME} ${SOURCES})
9191
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17")
9292
target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARY_LIST})
93+
# FFMPEG multi-version support
94+
if(_FFMPEG_AVCODEC_VERSION VERSION_LESS_EQUAL 58.134.100)
95+
target_compile_definitions(${PROJECT_NAME} PUBLIC USE_AVCODEC_GREATER_THAN_58_134=0)
96+
else()
97+
target_compile_definitions(${PROJECT_NAME} PUBLIC USE_AVCODEC_GREATER_THAN_58_134=1)
98+
endif()
9399
else()
94100
message("-- ERROR!: ${PROJECT_NAME} excluded! please install all the dependencies and try again!")
95101
if (NOT HIP_FOUND)

0 commit comments

Comments
 (0)