diff options
Diffstat (limited to 'src/combined')
-rw-r--r-- | src/combined/xine_ogg_demuxer.c | 9 |
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]); |