[vlc-commits] demux: mkv: use AV1_unpack
Francois Cartegnie
git at videolan.org
Thu Oct 11 16:57:41 CEST 2018
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 11 15:05:56 2018 +0200| [1685d6821f7e88500d9771504a554a34ad17d22e] | committer: Francois Cartegnie
demux: mkv: use AV1_unpack
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1685d6821f7e88500d9771504a554a34ad17d22e
---
modules/demux/Makefile.am | 1 +
modules/demux/mkv/mkv.cpp | 19 +++++++------------
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/modules/demux/Makefile.am b/modules/demux/Makefile.am
index 7c47591275..35dd0de5df 100644
--- a/modules/demux/Makefile.am
+++ b/modules/demux/Makefile.am
@@ -191,6 +191,7 @@ libmkv_plugin_la_SOURCES = \
demux/mkv/stream_io_callback.hpp demux/mkv/stream_io_callback.cpp \
demux/mp4/libmp4.c demux/vobsub.h \
demux/mkv/mkv.hpp demux/mkv/mkv.cpp \
+ demux/av1_unpack.h \
demux/windows_audio_commons.h
libmkv_plugin_la_SOURCES += packetizer/dts_header.h packetizer/dts_header.c
libmkv_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(CFLAGS_mkv)
diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp
index 9529f198d9..78eeb98db7 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -33,6 +33,10 @@
#include <new>
+extern "C" {
+ #include "../av1_unpack.h"
+}
+
#include <vlc_fs.h>
#include <vlc_url.h>
@@ -650,18 +654,9 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
break;
case VLC_CODEC_AV1:
- {
- if( (p_block->p_buffer[0] & 0x81) == 0 && /* reserved flags */
- (p_block->p_buffer[0] & 0x7A) != 0x12 ) /* no starting TEMPORAL_DELIMITER */
- {
- p_block = block_Realloc( p_block, 2, p_block->i_buffer );
- if( p_block )
- {
- p_block->p_buffer[0] = 0x12;
- p_block->p_buffer[1] = 0x00;
- }
- }
- }
+ p_block = AV1_Unpack_Sample( p_block );
+ if( unlikely( !p_block ) )
+ continue;
break;
}
More information about the vlc-commits
mailing list