[vlc-commits] demux: mkv: simplify matroska_stream_c
Zhao Zhili
git at videolan.org
Mon May 28 10:11:56 CEST 2018
vlc | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Mon May 28 15:00:42 2018 +0800| [2c2163bd937c3d90b10a2170b8c256ea900d7c3e] | committer: Steve Lhomme
demux: mkv: simplify matroska_stream_c
Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2c2163bd937c3d90b10a2170b8c256ea900d7c3e
---
modules/demux/mkv/mkv.cpp | 6 ++----
modules/demux/mkv/mkv.hpp | 9 ++++-----
2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 814794f907..f5ed6ba97d 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -31,8 +31,6 @@
#include "chapters.hpp"
#include "Ebml_parser.hpp"
-#include "stream_io_callback.hpp"
-
#include <new>
#include <vlc_fs.h>
@@ -887,8 +885,8 @@ mkv_track_t::~mkv_track_t()
}
matroska_stream_c::matroska_stream_c( stream_t *s, bool owner )
- :io_callback( new vlc_stream_io_callback( s, owner ) )
- ,estream( *io_callback )
+ :io_callback( s, owner )
+ ,estream( io_callback )
{}
bool matroska_stream_c::isUsed() const
diff --git a/modules/demux/mkv/mkv.hpp b/modules/demux/mkv/mkv.hpp
index 455256e385..ad48219a88 100644
--- a/modules/demux/mkv/mkv.hpp
+++ b/modules/demux/mkv/mkv.hpp
@@ -86,6 +86,8 @@
#include "matroska/KaxContentEncoding.h"
#include "matroska/KaxVersion.h"
+#include "stream_io_callback.hpp"
+
#ifdef HAVE_ZLIB_H
# include <zlib.h>
#endif
@@ -153,14 +155,11 @@ class matroska_segment_c;
struct matroska_stream_c
{
matroska_stream_c(stream_t *s, bool owner);
- ~matroska_stream_c()
- {
- delete io_callback;
- }
+ ~matroska_stream_c() {}
bool isUsed() const;
- IOCallback * io_callback;
+ vlc_stream_io_callback io_callback;
EbmlStream estream;
std::vector<matroska_segment_c*> segments;
More information about the vlc-commits
mailing list