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

Commit ea274671 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "media: dvb-core: Add feed state check before stop dvbdemux feed"

parents 4c536f1a 937fd61e
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);