summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-15 22:34:51 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-01-15 22:35:22 +0100
commitb16aa6f510ae74d48b8103f54894ac529c2538ef (patch)
treef996adb58f23ad985ca3f93b5ad369fc46240cc2
parent14d7a950203bbaa2a2fc460c49578e6bff8c4146 (diff)
parenteb021e999d1284fed67d9a7d7767dc7afd5c8346 (diff)
Merge branch 'master' into devel
Conflicts: configure.ac plugins/ffmpeg/ffmpeg.c
-rw-r--r--configure.ac2
-rw-r--r--junklib.c19
-rw-r--r--optmath.h2
-rw-r--r--plugins/ffmpeg/ffmpeg.c2
-rw-r--r--plugins/gtkui/callbacks.c2
5 files changed, 19 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 797c54bf..a0c7dc9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -172,7 +172,7 @@ fi
AM_CONDITIONAL(HAVE_FFMPEG, test $HAVE_FFMPEG)
if test ${HAVE_FFMPEG}; then
dnl check headers
- AC_CHECK_HEADER("ffmpeg/avformat.h", FFMPEG_DEPS_CFLAGS="$FFMPEG_DEPS_CFLAGS -D FFMPEG_OLD")
+ AC_CHECK_HEADER([ffmpeg/avformat.h], FFMPEG_DEPS_CFLAGS="$FFMPEG_DEPS_CFLAGS -D FFMPEG_OLD")
FFMPEG_DIR="plugins/ffmpeg"
AC_SUBST(FFMPEG_DEPS_CFLAGS)
AC_SUBST(FFMPEG_DEPS_LIBS)
diff --git a/junklib.c b/junklib.c
index d821775c..d6e3c63e 100644
--- a/junklib.c
+++ b/junklib.c
@@ -316,12 +316,7 @@ convstr_id3v2_4 (const unsigned char* str, int sz) {
// hack to add limited cp1251 recoding support
- if (*str == 0) {
- // iso8859-1
- trace ("iso8859-1\n");
- enc = "iso8859-1";
- }
- else if (*str == 3) {
+ if (*str == 3) {
// utf8
trace ("utf8\n");
strncpy (out, str+1, 2047);
@@ -337,6 +332,14 @@ convstr_id3v2_4 (const unsigned char* str, int sz) {
trace ("utf16be\n");
enc = "UTF-16BE";
}
+#if 0
+ // NOTE: some dumb taggers put non-iso8859-1 text with enc=0
+ else if (*str == 0) {
+ // iso8859-1
+ trace ("iso8859-1\n");
+ enc = "iso8859-1";
+ }
+#endif
else {
if (can_be_russian (&str[1])) {
enc = "cp1251";
@@ -815,6 +818,10 @@ junk_read_id3v2 (playItem_t *it, DB_FILE *fp) {
else if (version_major == 3) {
sz = (readptr[3] << 0) | (readptr[2] << 8) | (readptr[1] << 16) | (readptr[0] << 24);
}
+ else {
+ trace ("unknown id3v2 version (2.%d.%d)\n", version_major, version_minor);
+ return -1;
+ }
readptr += 4;
trace ("got frame %s, size %d, pos %d, tagsize %d\n", frameid, sz, readptr-tag, size);
if (readptr - tag >= size - sz) {
diff --git a/optmath.h b/optmath.h
index 3037f974..b5aa8c61 100644
--- a/optmath.h
+++ b/optmath.h
@@ -19,6 +19,8 @@
#ifndef __OPTMATH_H
#define __OPTMATH_H
+#include <math.h>
+
#ifdef __SSE2__ // that comes from -msse2
#define __FORCE_SSE2__
#endif
diff --git a/plugins/ffmpeg/ffmpeg.c b/plugins/ffmpeg/ffmpeg.c
index 3709d034..fdfaf840 100644
--- a/plugins/ffmpeg/ffmpeg.c
+++ b/plugins/ffmpeg/ffmpeg.c
@@ -38,6 +38,8 @@
#include <ffmpeg/avcodec.h>
#include <ffmpeg/avutil.h>
#include <ffmpeg/avstring.h>
+#define AVERROR_EOF AVERROR(EPIPE)
+#define av_register_protocol register_protocol
#endif
diff --git a/plugins/gtkui/callbacks.c b/plugins/gtkui/callbacks.c
index 0b6a0a9e..c256d18c 100644
--- a/plugins/gtkui/callbacks.c
+++ b/plugins/gtkui/callbacks.c
@@ -1889,7 +1889,7 @@ on_column_id_changed (GtkComboBox *combobox,
trace ("failed to get column format widget\n");
return;
}
- gtk_widget_set_sensitive (fmt, act > DB_COLUMN_ID_MAX ? FALSE : TRUE);
+ gtk_widget_set_sensitive (fmt, act > DB_COLUMN_ID_MAX ? TRUE : FALSE);
}