From 6bc78a78b69bd6dede7b4b1913f47959b1875228 Mon Sep 17 00:00:00 2001 From: James Courtier-Dutton Date: Mon, 13 Aug 2001 23:10:31 +0000 Subject: Fixed segfault if Audio or Video Plugin not loaded. CVS patchset: 422 CVS date: 2001/08/13 23:10:31 --- src/demuxers/demux_ts.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 86a0f7eab..4a7b74bbc 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: demux_ts.c,v 1.5 2001/08/12 15:12:54 guenter Exp $ + * $Id: demux_ts.c,v 1.6 2001/08/13 23:10:31 jcdutton Exp $ * * Demultiplexer for MPEG2 Transport Streams. * @@ -330,6 +330,7 @@ static void demux_ts_pes_buffer( unsigned int len) { demux_ts_media *m = &this->media[mediaIndex]; + if (!m->fifo) return; /* To avoid segfault if Video out or Audio out plugin not loaded */ /* * By checking the CC here, we avoid the need to check for the no-payload * case (i.e. adaptation field only) when it does not get bumped. @@ -666,7 +667,7 @@ static void demux_ts_parse_ts( /* * Do the demuxing in descending order of packet frequency! */ - if (pid == this->videoPid) { + if (pid == this->videoPid ) { demux_ts_pes_buffer(this, originalPkt+data_offset, this->videoMedia, payload_unit_start_indicator, continuity_counter, data_len); } else if (pid == this->audioPid) { demux_ts_pes_buffer(this, originalPkt+data_offset, this->audioMedia, payload_unit_start_indicator, continuity_counter, data_len); -- cgit v1.2.3