diff --git a/projects/rocdecode/samples/videoDecodeBatch/CMakeLists.txt b/projects/rocdecode/samples/videoDecodeBatch/CMakeLists.txt index 5faaa5f08d..c7bcd8c2cc 100644 --- a/projects/rocdecode/samples/videoDecodeBatch/CMakeLists.txt +++ b/projects/rocdecode/samples/videoDecodeBatch/CMakeLists.txt @@ -90,6 +90,12 @@ if(HIP_FOUND AND FFMPEG_FOUND AND ROCDECODE_FOUND) add_executable(${PROJECT_NAME} ${SOURCES}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17") target_link_libraries(${PROJECT_NAME} ${LINK_LIBRARY_LIST}) + # FFMPEG multi-version support + if(_FFMPEG_AVCODEC_VERSION VERSION_LESS_EQUAL 58.134.100) + target_compile_definitions(${PROJECT_NAME} PUBLIC USE_AVCODEC_GREATER_THAN_58_134=0) + else() + target_compile_definitions(${PROJECT_NAME} PUBLIC USE_AVCODEC_GREATER_THAN_58_134=1) + endif() else() message("-- ERROR!: ${PROJECT_NAME} excluded! please install all the dependencies and try again!") if (NOT HIP_FOUND)