Show
Ignore:
Timestamp:
01/23/15 18:15:20 (2 days ago)
Author:
robert
Message:

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."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgGA/GUIEventAdapter

    r13587 r13890  
    1212*/ 
    1313 
    14 #ifndef OSGGA_EVENT 
    15 #define OSGGA_EVENT 1 
     14#ifndef OSGGA_GUIEVENTADAPTER 
     15#define OSGGA_GUIEVENTADAPTER 1 
    1616 
    1717#include <osg/Object> 
    1818#include <osg/Matrix> 
    1919#include <osg/GraphicsContext> 
    20 #include <osgGA/Export> 
     20 
     21#include <osgGA/Event> 
    2122 
    2223namespace osgGA{ 
     
    7879/** Event class for storing Keyboard, mouse and window events. 
    7980*/ 
    80 class OSGGA_EXPORT GUIEventAdapter : public osg::Object 
     81class OSGGA_EXPORT GUIEventAdapter : public Event 
    8182{ 
    8283public: 
     
    449450        META_Object(osgGA, GUIEventAdapter); 
    450451 
     452        virtual GUIEventAdapter* asGUIEventAdapter() { return this; } 
     453        virtual const GUIEventAdapter* asGUIEventAdapter() const { return this; } 
     454 
    451455 
    452456        /** Get the accumulated event state singleton. 
     
    467471        /** get the event type. */ 
    468472        virtual EventType getEventType() const { return _eventType; } 
    469  
    470         /** set time in seconds of event. */ 
    471         void setTime(double time) { _time = time; } 
    472  
    473         /** get time in seconds of event. */ 
    474         double getTime() const { return _time; } 
    475473 
    476474        /** deprecated function for getting time of event. */ 
     
    710708        mutable bool _handled; 
    711709        EventType _eventType; 
    712         double _time; 
    713710 
    714711        osg::observer_ptr<osg::GraphicsContext> _context;