[vlc-commits] demux: mkv: use AV1_unpack
Francois Cartegnie
git at videolan.org
Wed Oct 17 15:22:17 CEST 2018
vlc/vlc-3.0 | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Oct 11 15:05:56 2018 +0200| [f1a2c932810b1765910166547e7bd6f32ddcf5cc] | committer: Tristan Matthews
demux: mkv: use AV1_unpack
(cherry picked from commit 1685d6821f7e88500d9771504a554a34ad17d22e)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=f1a2c932810b1765910166547e7bd6f32ddcf5cc
---
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 c6103ad4d1..7f9771ebe8 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 08a40aa8a7..6b9a818fd8 100644
--- a/modules/demux/mkv/mkv.cpp
+++ b/modules/demux/mkv/mkv.cpp
@@ -35,6 +35,10 @@
#include <new>
+extern "C" {
+ #include "../av1_unpack.h"
+}
+
#include <vlc_fs.h>
#include <vlc_url.h>
@@ -619,18 +623,9 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock
}
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