Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 937fd61e authored by Udaya Mallavarapu's avatar Udaya Mallavarapu Committed by Udaya Bhaskara Reddy Mallavarapu
Browse files

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: default avatarUdaya Mallavarapu <udaym@codeaurora.org>
parent 02f0c5a1
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
 *		       & Marcus Metzler <marcus@convergence.de>
 *			 for convergence integrated media GmbH
 *
 * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public License
@@ -2839,6 +2839,11 @@ static int dmx_section_feed_stop_filtering(struct dmx_section_feed *feed)

	mutex_lock(&dvbdmx->mutex);

	if (dvbdmxfeed->state < DMX_STATE_GO) {
		mutex_unlock(&dvbdmx->mutex);
		return -EINVAL;
	}

	if (!dvbdmx->stop_feed) {
		mutex_unlock(&dvbdmx->mutex);
		return -ENODEV;
+11 −3
Original line number Diff line number Diff line
/* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2017, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -1801,7 +1801,11 @@ int mpq_dmx_terminate_feed(struct dvb_demux_feed *feed)
		}

		mpq_sdmx_close_session(mpq_demux);
		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)) {
@@ -1818,7 +1822,11 @@ int mpq_dmx_terminate_feed(struct dvb_demux_feed *feed)
	}

	mpq_sdmx_terminate_metadata_buffer(mpq_feed);
	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);