[vlc-commits] demux: dirac: fix discontinuity flag
Francois Cartegnie
git at videolan.org
Sun Dec 3 13:19:56 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Dec 1 17:59:09 2017 +0100| [f64f1ed0ba706e3793981f51bf8668474c6f5d16] | committer: Francois Cartegnie
demux: dirac: fix discontinuity flag
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f64f1ed0ba706e3793981f51bf8668474c6f5d16
---
modules/demux/dirac.c | 19 ++++++++-----------
modules/packetizer/dirac.c | 2 --
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/modules/demux/dirac.c b/modules/demux/dirac.c
index c6eb7180ce..e8e7b67b60 100644
--- a/modules/demux/dirac.c
+++ b/modules/demux/dirac.c
@@ -158,23 +158,20 @@ static int Demux( demux_t *p_demux)
bool b_eof = false;
- if( p_sys->i_state == DIRAC_DEMUX_DISCONT )
+ p_block_in = vlc_stream_Block( p_demux->s, DIRAC_PACKET_SIZE );
+ if( !p_block_in )
{
- p_sys->i_state++;
- p_block_in = block_Alloc( 128 );
- if( p_block_in )
- {
- p_block_in->i_flags = BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED;
- }
+ b_eof = true;
}
else
{
- p_block_in = vlc_stream_Block( p_demux->s, DIRAC_PACKET_SIZE );
- if( !p_block_in )
+ if( p_sys->i_state == DIRAC_DEMUX_DISCONT )
{
- b_eof = true;
+ p_sys->i_state++;
+ p_block_in->i_flags = BLOCK_FLAG_DISCONTINUITY | BLOCK_FLAG_CORRUPTED;
}
- else if ( p_sys->i_state == DIRAC_DEMUX_FIRST)
+
+ if ( p_sys->i_state == DIRAC_DEMUX_FIRST )
{
p_sys->i_state++;
/* by default, timestamps are invalid.
diff --git a/modules/packetizer/dirac.c b/modules/packetizer/dirac.c
index fc4a0ded8e..be897c8374 100644
--- a/modules/packetizer/dirac.c
+++ b/modules/packetizer/dirac.c
@@ -1245,8 +1245,6 @@ static block_t *Packetize( decoder_t *p_dec, block_t **pp_block )
if( p_block->i_flags & BLOCK_FLAG_DISCONTINUITY )
{
- block_Release( p_block );
- p_block = NULL;
Flush( p_dec );
}
else if( p_block->i_flags & BLOCK_FLAG_CORRUPTED )
More information about the vlc-commits
mailing list