[vlc-commits] demux: ts: move all packet conversions in same place
Francois Cartegnie
git at videolan.org
Wed Jun 21 21:33:52 CEST 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Jun 19 16:34:49 2017 +0200| [e424a90294b2afbfb4c98c61bbffb178bb420b6f] | committer: Francois Cartegnie
demux: ts: move all packet conversions in same place
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e424a90294b2afbfb4c98c61bbffb178bb420b6f
---
modules/demux/mpeg/ts.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 585ba5945e..acf0698e3c 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -1505,10 +1505,8 @@ static void ParsePESDataChain( demux_t *p_demux, ts_pid_t *pid, block_t *p_pes )
p_pes->i_length = FROM_SCALE_NZ(i_length);
- /* Some codecs might need xform or AU splitting */
- block_t *p_chain = ConvertPESBlock( p_demux, p_es, i_pes_size, i_stream_id,
- block_ChainGather( p_pes ) );
-
+ /* Can become a chain on next call due to prepcr */
+ block_t *p_chain = block_ChainGather( p_pes );
while ( p_chain ) {
block_t *p_block = p_chain;
p_chain = p_chain->p_next;
@@ -1570,7 +1568,7 @@ static void ParsePESDataChain( demux_t *p_demux, ts_pid_t *pid, block_t *p_pes )
ProcessMetadata( p_demux->out, p_es->metadata.i_format, p_pmt->i_number,
p_block->p_buffer, p_block->i_buffer );
}
-
+ else
/* SL in PES */
if( pid->u.p_pes->i_stream_type == 0x12 &&
((i_stream_id & 0xFE) == 0xFA) /* 0xFA || 0xFB */ )
@@ -1607,6 +1605,11 @@ static void ParsePESDataChain( demux_t *p_demux, ts_pid_t *pid, block_t *p_pes )
}
}
}
+ else
+ /* Some codecs might need xform or AU splitting */
+ {
+ p_block = ConvertPESBlock( p_demux, p_es, i_pes_size, i_stream_id, p_block );
+ }
SendDataChain( p_demux, p_es, p_block );
}
More information about the vlc-commits
mailing list