[vlc-commits] demux: ts: replace push with explicit drain
Francois Cartegnie
git at videolan.org
Thu Jan 23 21:12:48 CET 2020
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan 23 18:48:15 2020 +0100| [7413a20bb2dbfd4691731dd8c5c8b2d8ea727385] | committer: Francois Cartegnie
demux: ts: replace push with explicit drain
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7413a20bb2dbfd4691731dd8c5c8b2d8ea727385
---
modules/demux/mpeg/ts.c | 2 +-
modules/demux/mpeg/ts_pes.c | 7 ++++++-
modules/demux/mpeg/ts_pes.h | 3 +--
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/modules/demux/mpeg/ts.c b/modules/demux/mpeg/ts.c
index 53b70aecf7..d17012744a 100644
--- a/modules/demux/mpeg/ts.c
+++ b/modules/demux/mpeg/ts.c
@@ -2350,7 +2350,7 @@ static void PCRCheckDTS( demux_t *p_demux, ts_pmt_t *p_pmt, stime_t i_pcr)
ts_pes_parse_callback cb = { .p_obj = VLC_OBJECT(p_demux),
.priv = p_pid,
.pf_parse = PESDataChainHandle };
- ts_pes_Push( &cb, p_pes, NULL, true ); /* Flush */
+ ts_pes_Drain( &cb, p_pes );
}
}
}
diff --git a/modules/demux/mpeg/ts_pes.c b/modules/demux/mpeg/ts_pes.c
index 308ee5e61a..305f2343df 100644
--- a/modules/demux/mpeg/ts_pes.c
+++ b/modules/demux/mpeg/ts_pes.c
@@ -96,7 +96,7 @@ static uint8_t *FindNextPESHeader( uint8_t *p_buf, size_t i_buffer )
return NULL;
}
-bool ts_pes_Push( ts_pes_parse_callback *cb,
+static bool ts_pes_Push( ts_pes_parse_callback *cb,
ts_stream_t *p_pes, block_t *p_pkt, bool b_unit_start )
{
bool b_ret = false;
@@ -137,6 +137,11 @@ bool ts_pes_Push( ts_pes_parse_callback *cb,
return b_ret;
}
+bool ts_pes_Drain( ts_pes_parse_callback *cb, ts_stream_t *p_pes )
+{
+ return ts_pes_Push( cb, p_pes, NULL, true );
+}
+
bool ts_pes_Gather( ts_pes_parse_callback *cb,
ts_stream_t *p_pes, block_t *p_pkt,
bool b_unit_start, bool b_valid_scrambling )
diff --git a/modules/demux/mpeg/ts_pes.h b/modules/demux/mpeg/ts_pes.h
index 57799b37bf..ffa68a68d0 100644
--- a/modules/demux/mpeg/ts_pes.h
+++ b/modules/demux/mpeg/ts_pes.h
@@ -29,8 +29,7 @@ typedef struct
void(*pf_parse)(vlc_object_t *, void *, block_t *);
} ts_pes_parse_callback;
-bool ts_pes_Push( ts_pes_parse_callback *cb,
- ts_stream_t *p_pes, block_t *p_pkt, bool b_unit_start );
+bool ts_pes_Drain( ts_pes_parse_callback *cb, ts_stream_t *p_pes );
bool ts_pes_Gather( ts_pes_parse_callback *cb,
ts_stream_t *p_pes, block_t *p_pkt,
More information about the vlc-commits
mailing list