diff --git a/include/osg/ImageStream b/include/osg/ImageStream index 7f5772afb..5f6f396eb 100644 --- a/include/osg/ImageStream +++ b/include/osg/ImageStream @@ -40,6 +40,7 @@ class SG_EXPORT ImageStream : public Image enum StreamStatus { + INVALID, PLAYING, PAUSED, REWINDING diff --git a/src/osg/ImageStream.cpp b/src/osg/ImageStream.cpp index 841409037..463aa3f16 100644 --- a/src/osg/ImageStream.cpp +++ b/src/osg/ImageStream.cpp @@ -16,7 +16,7 @@ using namespace osg; ImageStream::ImageStream(): - _status(PAUSED), + _status(INVALID), _loopingMode(LOOPING) { setDataVariance(DYNAMIC); diff --git a/src/osgPlugins/xine/ReaderWriterXine.cpp b/src/osgPlugins/xine/ReaderWriterXine.cpp index ac83245ba..4f0f1ca0a 100644 --- a/src/osgPlugins/xine/ReaderWriterXine.cpp +++ b/src/osgPlugins/xine/ReaderWriterXine.cpp @@ -75,24 +75,51 @@ class XineImageStream : public osg::ImageStream virtual void play() { - if (_status!=PLAYING) + if (_status!=PLAYING && _stream) { - osg::notify(osg::NOTICE)<<"XineImageStream::play()"<_ready) { imageStream->allocateImage(width,height,1,pixelFormat,GL_UNSIGNED_BYTE,1); @@ -142,14 +169,22 @@ class XineImageStream : public osg::ImageStream virtual ~XineImageStream() { + osg::notify(osg::NOTICE)<<"Killing XineImageStream"<