summaryrefslogtreecommitdiff
path: root/src/combined
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2011-10-05 00:04:37 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2011-10-05 00:04:37 +0100
commit6a2b53c22febcbc2041d760dccd795f388bc10c4 (patch)
treede97a08e2986472c6ce9a93fe92ca61d715edf2c /src/combined
parent5be586e3025e72c1a1cef2a3ada6238486f7ed43 (diff)
parent10d79495d21c47a6c890d501d461b62cb46081e1 (diff)
downloadxine-lib-6a2b53c22febcbc2041d760dccd795f388bc10c4.tar.gz
xine-lib-6a2b53c22febcbc2041d760dccd795f388bc10c4.tar.bz2
Merge from 1.1.
--HG-- rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c
Diffstat (limited to 'src/combined')
-rw-r--r--src/combined/xine_ogg_demuxer.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/combined/xine_ogg_demuxer.c b/src/combined/xine_ogg_demuxer.c
index fa6fd10eb..e297339df 100644
--- a/src/combined/xine_ogg_demuxer.c
+++ b/src/combined/xine_ogg_demuxer.c
@@ -449,6 +449,7 @@ static const struct ogg_meta {
OGG_META (COMMENT, 0),
};
+#if 0
/* ensure that those marked "append" are cleared */
/* FIXME: is this useful? Should they be cleared on first write? */
static void prepare_read_comments (demux_ogg_t *this)
@@ -461,6 +462,7 @@ static void prepare_read_comments (demux_ogg_t *this)
this->meta[metadata[i].meta] = NULL;
}
}
+#endif
static int read_comments (demux_ogg_t *this, const char *comment)
{
@@ -471,9 +473,10 @@ static int read_comments (demux_ogg_t *this, const char *comment)
if (!strncasecmp (metadata[i].tag, comment, ml) && comment[ml]) {
if (metadata[i].append && this->meta[metadata[i].meta]) {
char *newstr;
- asprintf (&newstr, "%s\n%s", this->meta[metadata[i].meta], comment + ml);
- free (this->meta[metadata[i].meta]);
- this->meta[metadata[i].meta] = newstr;
+ if (asprintf (&newstr, "%s\n%s", this->meta[metadata[i].meta], comment + ml) >= 0) {
+ free (this->meta[metadata[i].meta]);
+ this->meta[metadata[i].meta] = newstr;
+ }
}
else {
free (this->meta[metadata[i].meta]);