From 7501687fd5d336b2f8e704d0478fe43a1ce15681 Mon Sep 17 00:00:00 2001 From: Ian Nartowicz Date: Tue, 10 Jun 2014 17:00:53 +0100 Subject: Sync diffs and Makefile --- plugins/liboggedit/Makefile.am | 3 +++ plugins/liboggedit/oggedit.h | 2 +- plugins/liboggedit/oggedit_flac.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'plugins/liboggedit') diff --git a/plugins/liboggedit/Makefile.am b/plugins/liboggedit/Makefile.am index 651f9f44..e4da4841 100644 --- a/plugins/liboggedit/Makefile.am +++ b/plugins/liboggedit/Makefile.am @@ -2,5 +2,8 @@ if HAVE_OGG noinst_LIBRARIES = liboggedit.a liboggedit_a_SOURCES = oggedit_internal.h oggedit.h \ oggedit_internal.c oggedit_utils.c oggedit_art.c oggedit_opus.c oggedit_vorbis.c oggedit_flac.c +if HAVE_OGG_STREAM_FLUSH_FILL +OGG_CFLAGS += -DHAVE_OGG_STREAM_FLUSH_FILL +endif AM_CFLAGS = $(OGG_CFLAGS) -fPIC -std=c99 endif diff --git a/plugins/liboggedit/oggedit.h b/plugins/liboggedit/oggedit.h index d95d51bd..b0a4d9b0 100644 --- a/plugins/liboggedit/oggedit.h +++ b/plugins/liboggedit/oggedit.h @@ -61,7 +61,7 @@ #define OGGEDIT_STAT_FAILED -13 /* I/O error writing to file (disk full?) */ #define OGGEDIT_WRITE_ERROR -14 -/* Failed to flush pages from a stream, fatal Ogg internal error (libogg < v1.2.0?)*/ +/* Failed to flush pages from a stream, fatal Ogg internal error */ #define OGGEDIT_FLUSH_FAILED -15 /* Renaming tewmporary file failed (usually sticky bit or directory permissions) */ #define OGGEDIT_RENAME_FAILED -16 diff --git a/plugins/liboggedit/oggedit_flac.c b/plugins/liboggedit/oggedit_flac.c index b60a1d5a..7c4e5653 100644 --- a/plugins/liboggedit/oggedit_flac.c +++ b/plugins/liboggedit/oggedit_flac.c @@ -158,7 +158,7 @@ off_t oggedit_write_flac_metadata(DB_FILE *in, const char *fname, const off_t of const off_t stream_size_k = in->vfs->getlength(in) / 1000; // use file size for now const size_t metadata_size = 4 + vc_size(vendor, num_tags, tags); ptrdiff_t padding = headers[0]->bytes - metadata_size; - if (stream_size_k < 1000 || padding < 0 || headers[1] && padding > 0 || padding > stream_size_k+metadata_size) { + if (stream_size_k < 1000 || padding < 0 || (headers[1] && padding > 0) || padding > stream_size_k+metadata_size) { res = open_temp_file(fname, tempname, &out); if (res) { goto cleanup; -- cgit v1.2.3