mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
mpegtsmux: Don't use g_list_first ()
Seriously ...
This commit is contained in:
parent
c195a015e1
commit
e3a02ce49a
3 changed files with 7 additions and 11 deletions
|
@ -944,8 +944,7 @@ mpegtsmux_collected (GstCollectPads2 * pads, MpegTsMux * mux)
|
|||
mux->tsmux->last_pat_ts = -1;
|
||||
|
||||
/* output PMT for each program */
|
||||
for (cur = g_list_first (mux->tsmux->programs); cur != NULL;
|
||||
cur = g_list_next (cur)) {
|
||||
for (cur = mux->tsmux->programs; cur; cur = cur->next) {
|
||||
TsMuxProgram *program = (TsMuxProgram *) cur->data;
|
||||
|
||||
program->last_pmt_ts = -1;
|
||||
|
|
|
@ -206,7 +206,7 @@ tsmux_free (TsMux * mux)
|
|||
g_return_if_fail (mux != NULL);
|
||||
|
||||
/* Free all programs */
|
||||
for (cur = g_list_first (mux->programs); cur != NULL; cur = g_list_next (cur)) {
|
||||
for (cur = mux->programs; cur; cur = cur->next) {
|
||||
TsMuxProgram *program = (TsMuxProgram *) cur->data;
|
||||
|
||||
tsmux_program_free (program);
|
||||
|
@ -214,7 +214,7 @@ tsmux_free (TsMux * mux)
|
|||
g_list_free (mux->programs);
|
||||
|
||||
/* Free all streams */
|
||||
for (cur = g_list_first (mux->streams); cur != NULL; cur = g_list_next (cur)) {
|
||||
for (cur = mux->streams; cur; cur = cur->next) {
|
||||
TsMuxStream *stream = (TsMuxStream *) cur->data;
|
||||
|
||||
tsmux_stream_free (stream);
|
||||
|
@ -417,7 +417,7 @@ tsmux_find_stream (TsMux * mux, guint16 pid)
|
|||
|
||||
g_return_val_if_fail (mux != NULL, NULL);
|
||||
|
||||
for (cur = g_list_first (mux->streams); cur != NULL; cur = g_list_next (cur)) {
|
||||
for (cur = mux->streams; cur; cur = cur->next) {
|
||||
TsMuxStream *stream = (TsMuxStream *) cur->data;
|
||||
|
||||
if (tsmux_stream_get_pid (stream) == pid) {
|
||||
|
@ -749,8 +749,7 @@ tsmux_write_stream_packet (TsMux * mux, TsMuxStream * stream)
|
|||
}
|
||||
|
||||
/* check if we need to rewrite any of the current pmts */
|
||||
for (cur = g_list_first (mux->programs); cur != NULL;
|
||||
cur = g_list_next (cur)) {
|
||||
for (cur = mux->programs; cur; cur = cur->next) {
|
||||
TsMuxProgram *program = (TsMuxProgram *) cur->data;
|
||||
gboolean write_pmt;
|
||||
|
||||
|
@ -915,8 +914,7 @@ tsmux_write_pat (TsMux * mux)
|
|||
/* Prepare the section data after the section header */
|
||||
pos = pat->data + TSMUX_SECTION_HDR_SIZE;
|
||||
|
||||
for (cur = g_list_first (mux->programs); cur != NULL;
|
||||
cur = g_list_next (cur)) {
|
||||
for (cur = mux->programs; cur; cur = cur->next) {
|
||||
TsMuxProgram *program = (TsMuxProgram *) cur->data;
|
||||
|
||||
tsmux_put16 (&pos, program->pgm_number);
|
||||
|
|
|
@ -506,8 +506,7 @@ tsmux_stream_find_pts_dts_within (TsMuxStream * stream, guint bound,
|
|||
*pts = -1;
|
||||
*dts = -1;
|
||||
|
||||
for (cur = g_list_first (stream->buffers); cur != NULL;
|
||||
cur = g_list_next (cur)) {
|
||||
for (cur = stream->buffers; cur; cur = cur->next) {
|
||||
TsMuxStreamBuffer *curbuf = cur->data;
|
||||
|
||||
/* FIXME: This isn't quite correct - if the 'bound' is within this
|
||||
|
|
Loading…
Reference in a new issue