media: dvb-core: Add feed state check before stop dvbdemux feed
Add feed state check whether any filter is configured on dvbdemux feed before feed stop is called. If any filter is started the feed status should be set to DMX_STATE_GO. CRs-Fixed: 1090466 Change-Id: If9e87065bb9fb82befb398f2a3a0d0da2f76efa5 Signed-off-by: Udaya Mallavarapu <udaym@codeaurora.org>
This commit is contained in:
parent
69352ff8b4
commit
34cbae8bc5
2 changed files with 15 additions and 2 deletions
|
@ -2840,6 +2840,11 @@ static int dmx_section_feed_stop_filtering(struct dmx_section_feed *feed)
|
||||||
|
|
||||||
mutex_lock(&dvbdmx->mutex);
|
mutex_lock(&dvbdmx->mutex);
|
||||||
|
|
||||||
|
if (dvbdmxfeed->state < DMX_STATE_GO) {
|
||||||
|
mutex_unlock(&dvbdmx->mutex);
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
if (!dvbdmx->stop_feed) {
|
if (!dvbdmx->stop_feed) {
|
||||||
mutex_unlock(&dvbdmx->mutex);
|
mutex_unlock(&dvbdmx->mutex);
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
|
@ -1801,7 +1801,11 @@ int mpq_dmx_terminate_feed(struct dvb_demux_feed *feed)
|
||||||
}
|
}
|
||||||
|
|
||||||
mpq_sdmx_close_session(mpq_demux);
|
mpq_sdmx_close_session(mpq_demux);
|
||||||
mpq_demux->num_secure_feeds--;
|
if (mpq_demux->num_secure_feeds > 0)
|
||||||
|
mpq_demux->num_secure_feeds--;
|
||||||
|
else
|
||||||
|
MPQ_DVB_DBG_PRINT("%s: Invalid secure feed count= %u\n",
|
||||||
|
__func__, mpq_demux->num_secure_feeds);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dvb_dmx_is_video_feed(feed)) {
|
if (dvb_dmx_is_video_feed(feed)) {
|
||||||
|
@ -1818,7 +1822,11 @@ int mpq_dmx_terminate_feed(struct dvb_demux_feed *feed)
|
||||||
}
|
}
|
||||||
|
|
||||||
mpq_sdmx_terminate_metadata_buffer(mpq_feed);
|
mpq_sdmx_terminate_metadata_buffer(mpq_feed);
|
||||||
mpq_demux->num_active_feeds--;
|
if (mpq_demux->num_active_feeds > 0)
|
||||||
|
mpq_demux->num_active_feeds--;
|
||||||
|
else
|
||||||
|
MPQ_DVB_DBG_PRINT("%s: Invalid num_active_feeds count = %u\n",
|
||||||
|
__func__, mpq_demux->num_active_feeds);
|
||||||
|
|
||||||
mutex_unlock(&mpq_demux->mutex);
|
mutex_unlock(&mpq_demux->mutex);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue