vlc/vlc-3.0 | branch: master | Francois Cartegnie <[email protected]> | Wed Oct 10 11:45:29 2018 +0200| [e9d85901c060ba920530ccbcfae2d3bfcce77d1c] | committer: Tristan Matthews
demux: mkv: readd missing AV1 temporal delimiter after demux (cherry picked from commit 7f8079692efce04977de79d1c050e23477dc76d3) > http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=e9d85901c060ba920530ccbcfae2d3bfcce77d1c --- modules/demux/mkv/mkv.cpp | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/modules/demux/mkv/mkv.cpp b/modules/demux/mkv/mkv.cpp index 1667c12a0e..08a40aa8a7 100644 --- a/modules/demux/mkv/mkv.cpp +++ b/modules/demux/mkv/mkv.cpp @@ -609,11 +609,28 @@ void BlockDecode( demux_t *p_demux, KaxBlock *block, KaxSimpleBlock *simpleblock break; case VLC_CODEC_OPUS: - mtime_t i_length = i_duration * track. f_timecodescale * - (double) p_segment->i_timescale / 1000.0; - if ( i_length < 0 ) i_length = 0; - p_block->i_nb_samples = i_length * track.fmt.audio.i_rate - / CLOCK_FREQ; + { + mtime_t i_length = i_duration * track. f_timecodescale * + (double) p_segment->i_timescale / 1000.0; + if ( i_length < 0 ) i_length = 0; + p_block->i_nb_samples = i_length * track.fmt.audio.i_rate + / CLOCK_FREQ; + 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; + } + } + } break; } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
