mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-22 23:28:16 +00:00
dvbsrc: set common PES filter params once and reuse
Avoid setting the same harcoded values over and over again.
This commit is contained in:
parent
faf6e5a1eb
commit
c66f5080aa
1 changed files with 6 additions and 4 deletions
|
@ -2763,6 +2763,12 @@ gst_dvbsrc_set_pes_filters (GstDvbSrc * object)
|
|||
|
||||
GST_INFO_OBJECT (object, "Setting PES filter");
|
||||
|
||||
/* Set common params for all filters */
|
||||
pes_filter.input = DMX_IN_FRONTEND;
|
||||
pes_filter.output = DMX_OUT_TS_TAP;
|
||||
pes_filter.pes_type = DMX_PES_OTHER;
|
||||
pes_filter.flags = DMX_IMMEDIATE_START;
|
||||
|
||||
for (i = 0; i < MAX_FILTERS; i++) {
|
||||
if (object->pids[i] == G_MAXUINT16)
|
||||
break;
|
||||
|
@ -2780,10 +2786,6 @@ gst_dvbsrc_set_pes_filters (GstDvbSrc * object)
|
|||
g_return_if_fail (*fd != -1);
|
||||
|
||||
pes_filter.pid = pid;
|
||||
pes_filter.input = DMX_IN_FRONTEND;
|
||||
pes_filter.output = DMX_OUT_TS_TAP;
|
||||
pes_filter.pes_type = DMX_PES_OTHER;
|
||||
pes_filter.flags = DMX_IMMEDIATE_START;
|
||||
|
||||
GST_INFO_OBJECT (object, "Setting PES filter: pid = %d, type = %d",
|
||||
pes_filter.pid, pes_filter.pes_type);
|
||||
|
|
Loading…
Reference in a new issue