summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Ian Nartowicz <iann@crunchbang>2014-06-10 17:00:53 +0100
committerGravatar Ian Nartowicz <iann@crunchbang>2014-06-10 17:00:53 +0100
commit7501687fd5d336b2f8e704d0478fe43a1ce15681 (patch)
treee3c33195235274a414f64f16cc87c17c4b9191d5 /plugins
parente4f6a43d63372d9ddc21574d5fc43aea01c9c117 (diff)
Sync diffs and Makefile
Diffstat (limited to 'plugins')
-rw-r--r--plugins/liboggedit/Makefile.am3
-rw-r--r--plugins/liboggedit/oggedit.h2
-rw-r--r--plugins/liboggedit/oggedit_flac.c2
3 files changed, 5 insertions, 2 deletions
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;