root/OpenSceneGraph/trunk/examples/osgQtBrowser/CMakeLists.txt @ 13482

Revision 13482, 0.8 kB (checked in by robert, 4 days ago)

From Javier Taibo,
"I have found a "bug" in the new audio decoding code (actually I think the bug is in ffmpeg, but anyway it should be wise to protect the OSG plug-in about it). I am attaching a security check in FFmpegDecoderAudio.cpp.

If anybody is curious about the problem, it happens sometimes when decoding an AAC audio stream. It eventually includes a PCE block inside the AAC audio frame and then ffmpeg audio decoding function signals a "new_frame" with 1024 samples, but a null pointer instead of the audio data. It can be easily detected because in these cases number of channels is 0. Maybe this is the intended behaviour for ffmpeg, but I find it quite weird.
"

" It seems that libav does not have a channels attribute in AVFrame structure. This new version should do."

  • Property svn:eol-style set to native
Line 
1SET(TARGET_SRC
2    osgQtBrowser.cpp
3)
4
5IF(CMAKE_COMPILER_IS_GNUCXX)
6    # Remove -pedantic flag as it barfs on Qt headers
7   STRING(REGEX REPLACE "-pedantic" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
8ENDIF()
9
10if ( QT4_FOUND )
11    SET(TARGET_EXTERNAL_LIBRARIES ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTWEBKIT_LIBRARY})
12    INCLUDE_DIRECTORIES(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTWEBKIT_INCLUDE_DIR} )
13endif( QT4_FOUND )
14
15SET(TARGET_ADDED_LIBRARIES osgWidget osgQt)
16
17#### end var setup  ###
18SET ( EXAMPLE_NAME osgQtBrowser )
19SETUP_EXAMPLE(${EXAMPLE_NAME})
20
21IF ( Qt5Widgets_FOUND )
22    qt5_use_modules( example_${EXAMPLE_NAME} Widgets OpenGL WebKitWidgets )
23ENDIF( Qt5Widgets_FOUND )
24
25
Note: See TracBrowser for help on using the browser.