From 01ef002ace693476f29d0cd7ffff816c90570137 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 23 Jan 2007 23:20:23 +0000 Subject: - Don't try to print " / <chapter>" if there's no title, avoid things like "(null) / Chapter 1" when the title isn't available (and a possible crasher on non-Linux platforms) CVS patchset: 8547 CVS date: 2007/01/23 23:20:23 --- src/demuxers/demux_ogg.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c index a042bc7ec..218728e1b 100644 --- a/src/demuxers/demux_ogg.c +++ b/src/demuxers/demux_ogg.c @@ -19,7 +19,7 @@ */ /* - * $Id: demux_ogg.c,v 1.173 2007/01/22 17:33:35 klan Exp $ + * $Id: demux_ogg.c,v 1.174 2007/01/23 23:20:23 hadess Exp $ * * demultiplexer for ogg streams * @@ -536,7 +536,11 @@ static void update_chapter_display (demux_ogg_t *this, int stream_num, ogg_packe if (chapter >= 0) { char t_title[256]; - snprintf(t_title, sizeof (t_title), "%s / %s", this->title, this->chapter_info->entries[chapter].name); + if (this->title) { + snprintf(t_title, sizeof (t_title), "%s / %s", this->title, this->chapter_info->entries[chapter].name); + } else { + snprintf(t_title, sizeof (t_title), "%s", this->chapter_info->entries[chapter].name); + } title = t_title; } else { title = this->title; -- cgit v1.2.3