[vlc-devel] [PATCH] demux: mkv: remove config.h from stream_io_callback.hpp
Zhao Zhili
quinkblack at foxmail.com
Thu May 31 11:46:34 CEST 2018
---
As suggested by RĂ©mi, if I understand correctly.
modules/demux/mkv/stream_io_callback.cpp | 13 +++++++++++++
modules/demux/mkv/stream_io_callback.hpp | 14 ++++----------
2 files changed, 17 insertions(+), 10 deletions(-)
diff --git a/modules/demux/mkv/stream_io_callback.cpp b/modules/demux/mkv/stream_io_callback.cpp
index 32e5692..6f97ed4 100644
--- a/modules/demux/mkv/stream_io_callback.cpp
+++ b/modules/demux/mkv/stream_io_callback.cpp
@@ -22,6 +22,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <vlc_common.h>
+#include <vlc_demux.h>
+
#include "stream_io_callback.hpp"
/*****************************************************************************
@@ -33,6 +40,12 @@ vlc_stream_io_callback::vlc_stream_io_callback( stream_t *s_, bool b_owner_ )
mb_eof = false;
}
+vlc_stream_io_callback::~vlc_stream_io_callback()
+{
+ if( b_owner )
+ vlc_stream_Delete( s );
+}
+
uint32 vlc_stream_io_callback::read( void *p_buffer, size_t i_size )
{
if( i_size <= 0 || mb_eof )
diff --git a/modules/demux/mkv/stream_io_callback.hpp b/modules/demux/mkv/stream_io_callback.hpp
index d0621c5..e11b357 100644
--- a/modules/demux/mkv/stream_io_callback.hpp
+++ b/modules/demux/mkv/stream_io_callback.hpp
@@ -25,11 +25,8 @@
#ifndef VLC_MKV_STREAM_IO_CALLBACK_HPP_
#define VLC_MKV_STREAM_IO_CALLBACK_HPP_
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_demux.h>
+#include <stdbool.h>
+#include <stdint.h>
#include "ebml/IOCallback.h"
@@ -38,6 +35,7 @@ using namespace LIBEBML_NAMESPACE;
/*****************************************************************************
* Stream managment
*****************************************************************************/
+struct stream_t;
class vlc_stream_io_callback: public IOCallback
{
private:
@@ -48,11 +46,7 @@ class vlc_stream_io_callback: public IOCallback
public:
vlc_stream_io_callback( stream_t *, bool owner );
- virtual ~vlc_stream_io_callback()
- {
- if( b_owner )
- vlc_stream_Delete( s );
- }
+ virtual ~vlc_stream_io_callback();
bool IsEOF() const { return mb_eof; }
--
2.9.5
More information about the vlc-devel
mailing list