summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Viehmann <tv@beamnet.de>2009-01-04 21:11:44 +0100
committerThomas Viehmann <tv@beamnet.de>2009-01-04 21:11:44 +0100
commit4f32e89e05204737b233617fd065a1da519bfbf8 (patch)
tree2a88108e90479a5fc1b9e55bfab93982561854ac
parentde3b12bc7488ca43834f2840619744a9ec2c5b16 (diff)
downloadxine-lib-4f32e89e05204737b233617fd065a1da519bfbf8.tar.gz
xine-lib-4f32e89e05204737b233617fd065a1da519bfbf8.tar.bz2
fail to set up codec when fifo is not set up
When a track's fifo is not set up (typically because the track type is invalid), do not call init_codec, as all implementations dereference track->fifo, segfaulting if it is NULL.
-rw-r--r--src/demuxers/demux_matroska.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/demuxers/demux_matroska.c b/src/demuxers/demux_matroska.c
index 6bd700f9a..0a96295ec 100644
--- a/src/demuxers/demux_matroska.c
+++ b/src/demuxers/demux_matroska.c
@@ -1484,9 +1484,14 @@ static int parse_track_entry(demux_matroska_t *this, matroska_track_t *track) {
break;
}
- if (init_codec)
+ if (init_codec) {
+ if (! track->fifo) {
+ xprintf(this->stream->xine, XINE_VERBOSITY_LOG,
+ "demux_matroska: Error: fifo not set up for track of type type %" PRIu32 "\n", track->track_type);
+ return 0;
+ }
init_codec(this, track);
-
+ }
}
}