[vlc-commits] demux: ts: remove unused return value
Francois Cartegnie
git at videolan.org
Tue Oct 13 20:14:49 CEST 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Mon Oct 12 17:40:24 2020 +0200| [0d190507e99571c80dd3ccd95c3cb9079c807024] | committer: Francois Cartegnie
demux: ts: remove unused return value
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0d190507e99571c80dd3ccd95c3cb9079c807024
---
modules/demux/mpeg/ts.c | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 8a98e3c6a3..62569d859f 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2039,7 +2039,7 @@ static int SeekToTime( demux_t *p_demux, const ts_pmt_t *p_pmt, stime_t i_scaled
return VLC_SUCCESS;
}
-static int ProbeChunk( demux_t *p_demux, int i_program, bool b_end, stime_t *pi_pcr, bool *pb_found )
+static int ProbeChunk( demux_t *p_demux, int i_program, bool b_end, bool *pb_found )
{
demux_sys_t *p_sys = p_demux->p_sys;
int i_count = 0;
@@ -2047,7 +2047,7 @@ static int ProbeChunk( demux_t *p_demux, int i_program, bool b_end, stime_t *pi_
for( ;; )
{
- *pi_pcr = -1;
+ stime_t i_pcr = -1;
if( i_count++ > PROBE_CHUNK_COUNT || !( p_pkt = ReadTSPacket( p_demux ) ) )
{
@@ -2072,9 +2072,9 @@ static int ProbeChunk( demux_t *p_demux, int i_program, bool b_end, stime_t *pi_
bool b_adaptfield = p_pkt->p_buffer[3] & 0x20;
if( b_adaptfield && p_pkt->i_buffer >= 4 + 2 + 5 )
- *pi_pcr = GetPCR( p_pkt );
+ i_pcr = GetPCR( p_pkt );
- if( *pi_pcr == -1 &&
+ if( i_pcr == -1 &&
(p_pkt->p_buffer[1] & 0xC0) == 0x40 && /* payload start */
(p_pkt->p_buffer[3] & 0xD0) == 0x10 && /* Has payload but is not encrypted */
p_pid->type == TYPE_STREAM &&
@@ -2094,13 +2094,13 @@ static int ProbeChunk( demux_t *p_demux, int i_program, bool b_end, stime_t *pi_
&i_dts, &i_pts, &i_stream_id, NULL ) )
{
if( i_dts != -1 )
- *pi_pcr = i_dts;
+ i_pcr = i_dts;
else if( i_pts != -1 )
- *pi_pcr = i_pts;
+ i_pcr = i_pts;
}
}
- if( *pi_pcr != -1 )
+ if( i_pcr != -1 )
{
ts_pat_t *p_pat = GetPID(p_sys, 0)->u.p_pat;
for( int i=0; i<p_pat->programs.i_size; i++ )
@@ -2113,17 +2113,17 @@ static int ProbeChunk( demux_t *p_demux, int i_program, bool b_end, stime_t *pi_
{
if( b_end )
{
- p_pmt->i_last_dts = *pi_pcr;
+ p_pmt->i_last_dts = i_pcr;
p_pmt->i_last_dts_byte = vlc_stream_Tell( p_sys->stream );
}
/* Start, only keep first */
else if( b_pcrresult && p_pmt->pcr.i_first == -1 )
{
- p_pmt->pcr.i_first = *pi_pcr;
+ p_pmt->pcr.i_first = i_pcr;
}
else if( p_pmt->pcr.i_first_dts == -1 )
{
- p_pmt->pcr.i_first_dts = *pi_pcr;
+ p_pmt->pcr.i_first_dts = i_pcr;
}
if( i_program == 0 || i_program == p_pmt->i_number )
@@ -2147,7 +2147,6 @@ int ProbeStart( demux_t *p_demux, int i_program )
int i_probe_count = 0;
int64_t i_pos;
- stime_t i_pcr = -1;
bool b_found = false;
do
@@ -2158,7 +2157,7 @@ int ProbeStart( demux_t *p_demux, int i_program )
if( vlc_stream_Seek( p_sys->stream, i_pos ) )
return VLC_EGENERIC;
- ProbeChunk( p_demux, i_program, false, &i_pcr, &b_found );
+ ProbeChunk( p_demux, i_program, false, &b_found );
/* Go ahead one more chunk if end of file contained only stuffing packets */
i_probe_count += PROBE_CHUNK_COUNT;
@@ -2179,7 +2178,6 @@ int ProbeEnd( demux_t *p_demux, int i_program )
int i_probe_count = PROBE_CHUNK_COUNT;
int64_t i_pos;
- stime_t i_pcr = -1;
bool b_found = false;
do
@@ -2190,7 +2188,7 @@ int ProbeEnd( demux_t *p_demux, int i_program )
if( vlc_stream_Seek( p_sys->stream, i_pos ) )
return VLC_EGENERIC;
- ProbeChunk( p_demux, i_program, true, &i_pcr, &b_found );
+ ProbeChunk( p_demux, i_program, true, &b_found );
/* Go ahead one more chunk if end of file contained only stuffing packets */
i_probe_count += PROBE_CHUNK_COUNT;
More information about the vlc-commits
mailing list