[vlc-commits] demux: ttml: fix logic regression following bloc_heap changes

Francois Cartegnie git at videolan.org
Fri Jan 20 21:31:40 CET 2017


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan 20 17:00:39 2017 +0100| [cf5e25b2ac0dd2931c54cb8f2feb9fdb61d81e71] | committer: Francois Cartegnie

demux: ttml: fix logic regression following bloc_heap changes

blocking due to no longer incrementing pcr

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cf5e25b2ac0dd2931c54cb8f2feb9fdb61d81e71
---

 modules/demux/ttml.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/modules/demux/ttml.c b/modules/demux/ttml.c
index 7e21d0b..38f06bb 100644
--- a/modules/demux/ttml.c
+++ b/modules/demux/ttml.c
@@ -332,15 +332,14 @@ static int Demux( demux_t* p_demux )
         if( vlc_memstream_close( &stream ) == VLC_SUCCESS )
         {
             block_t* p_block = block_heap_Alloc( stream.ptr, stream.length );
+            if( p_block )
+            {
+                p_block->i_dts =
+                    p_block->i_pts = VLC_TS_0 + i_playbacktime;
+                p_block->i_length = i_playbackendtime - i_playbacktime;
 
-            if( unlikely( p_block == NULL ) )
-                return VLC_DEMUXER_EGENERIC;
-
-            p_block->i_dts =
-                p_block->i_pts = VLC_TS_0 + i_playbacktime;
-            p_block->i_length = i_playbackendtime - i_playbacktime;
-
-            es_out_Send( p_demux->out, p_sys->p_es, p_block );
+                es_out_Send( p_demux->out, p_sys->p_es, p_block );
+            }
         }
 
         p_sys->times.i_current++;



More information about the vlc-commits mailing list