vlc | branch: master | Francois Cartegnie <[email protected]> | Thu Oct 11 15:03:13 2018 +0200| [012a6d58c766774440f1af8df0069b9a03db1d80] | committer: Francois Cartegnie
demux: mp4: use AV1_unpack > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=012a6d58c766774440f1af8df0069b9a03db1d80 --- modules/demux/Makefile.am | 1 + modules/demux/mp4/mp4.c | 19 ++----------------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/modules/demux/Makefile.am b/modules/demux/Makefile.am index fbc23229b3..7c47591275 100644 --- a/modules/demux/Makefile.am +++ b/modules/demux/Makefile.am @@ -209,6 +209,7 @@ libmp4_plugin_la_SOURCES = demux/mp4/mp4.c demux/mp4/mp4.h \ demux/mp4/heif.c demux/mp4/heif.h \ demux/mp4/avci.h \ demux/mp4/essetup.c demux/mp4/meta.c \ + demux/av1_unpack.h \ demux/asf/asfpacket.c demux/asf/asfpacket.h \ packetizer/iso_color_tables.h \ meta_engine/ID3Genres.h diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c index ce282c80dd..fe4baee4cc 100644 --- a/modules/demux/mp4/mp4.c +++ b/modules/demux/mp4/mp4.c @@ -39,6 +39,7 @@ #include <limits.h> #include "../codec/cc.h" #include "heif.h" +#include "../av1_unpack.h" /***************************************************************************** * Module descriptor @@ -490,22 +491,6 @@ static int CreateTracks( demux_t *p_demux, unsigned i_tracks ) return VLC_SUCCESS; } -static block_t * MP4_AV1_Convert( block_t *p_block ) -{ - /* See av1-isobmff 2.4 */ - if( (p_block->p_buffer[0] & 0x81) == 0 && /* reserved flags */ - (p_block->p_buffer[0] & 0x7A) != 0x12 ) /* not 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; - } - } - return p_block; -} - static block_t * MP4_EIA608_Convert( block_t * p_block ) { /* Rebuild codec data from encap */ @@ -664,7 +649,7 @@ static block_t * MP4_Block_Convert( demux_t *p_demux, const mp4_track_t *p_track } else if( p_track->fmt.i_codec == VLC_CODEC_AV1 ) { - p_block = MP4_AV1_Convert( p_block ); + p_block = AV1_Unpack_Sample( p_block ); } else if( p_track->fmt.i_original_fourcc == ATOM_rrtp ) { _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
