mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-07-11 17:06:45 +00:00
mpegtsmux: avoid PID collision for auto-generated PID
This commit is contained in:
parent
fa4f487d8f
commit
38bb55c472
|
@ -356,9 +356,13 @@ tsmux_get_new_pid (TsMux * mux)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (mux != NULL, -1);
|
g_return_val_if_fail (mux != NULL, -1);
|
||||||
|
|
||||||
/* FIXME: It's possible that this next PID is already taken if a
|
/* make sure this PID is free
|
||||||
* specific PID was requested earlier. We should find a free PID */
|
* (and not taken by a specific earlier request) */
|
||||||
return mux->next_stream_pid++;
|
do {
|
||||||
|
mux->next_stream_pid++;
|
||||||
|
} while (tsmux_find_stream (mux, mux->next_stream_pid));
|
||||||
|
|
||||||
|
return mux->next_stream_pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue