summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2004-09-22 20:54:44 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2004-09-22 20:54:44 +0000
commite50e14dbfbc78ecca9366a47392907e37501fea6 (patch)
treeaea1c70ae0b82ce4daf34e0be01548917b3f8d2c
parentfa11460bbd06540d43ffe53d047f25639a0a6b83 (diff)
downloadxine-lib-e50e14dbfbc78ecca9366a47392907e37501fea6.tar.gz
xine-lib-e50e14dbfbc78ecca9366a47392907e37501fea6.tar.bz2
Do not segfault if there is no seekpoint.
CVS patchset: 6992 CVS date: 2004/09/22 20:54:44
-rw-r--r--src/demuxers/demux_flac.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/demuxers/demux_flac.c b/src/demuxers/demux_flac.c
index d1f7057df..6d4b3bff0 100644
--- a/src/demuxers/demux_flac.c
+++ b/src/demuxers/demux_flac.c
@@ -23,7 +23,7 @@
* For more information on the FLAC file format, visit:
* http://flac.sourceforge.net/
*
- * $Id: demux_flac.c,v 1.6 2004/09/20 19:30:04 valtri Exp $
+ * $Id: demux_flac.c,v 1.7 2004/09/22 20:54:44 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -308,6 +308,12 @@ static int demux_flac_seek (demux_plugin_t *this_gen,
this->status = DEMUX_OK;
} else {
+ if (this->seekpoints == NULL) {
+ /* cannot seek if there is no seekpoints */
+ this->status = DEMUX_OK;
+ return this->status;
+ }
+
/* do a lazy, linear seek based on the assumption that there are not
* that many seek points */
if (start_pos) {