diff --git a/avconv.c b/avconv.c
index 9c94134..80314f3 100644
--- a/avconv.c
+++ b/avconv.c
@@ -1397,7 +1397,7 @@ static void print_report(OutputFile *output_files,
     int64_t pts = INT64_MAX;
     static int64_t last_time = -1;
     static int qp_histogram[52];
-    int hours, mins, secs, us;
+    //int hours, mins, secs, us;
 
     if (!print_stats && !is_last_report)
         return;
@@ -1477,20 +1477,21 @@ static void print_report(OutputFile *output_files,
                                       ost->st->time_base, AV_TIME_BASE_Q));
     }
 
-    secs = pts / AV_TIME_BASE;
-    us = pts % AV_TIME_BASE;
-    mins = secs / 60;
-    secs %= 60;
-    hours = mins / 60;
-    mins %= 60;
+    //secs = pts / AV_TIME_BASE;
+    //us = pts % AV_TIME_BASE;
+    //mins = secs / 60;
+    //secs %= 60;
+    //hours = mins / 60;
+    //mins %= 60;
 
     bitrate = pts ? total_size * 8 / (pts / 1000.0) : 0;
 
     snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
-             "size=%8.0fkB time=", total_size / 1024.0);
-    snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
-             "%02d:%02d:%02d.%02d ", hours, mins, secs,
-             (100 * us) / AV_TIME_BASE);
+             "size=%8.0fkB time=%0.2f ", total_size / 1024.0, (double)pts / AV_TIME_BASE);
+    //         "size=%8.0fkB time=", total_size / 1024.0);
+    //snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
+    //         "%02d:%02d:%02d.%02d ", hours, mins, secs,
+    //         (100 * us) / AV_TIME_BASE);
     snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
              "bitrate=%6.1fkbits/s", bitrate);
 
diff --git a/configure b/configure
index 7596c41..4cae66a 100755
--- a/configure
+++ b/configure
@@ -3059,7 +3059,7 @@ check_mathfunc truncf
 # these are off by default, so fail if requested and not available
 enabled avisynth   && require2 vfw32 "windows.h vfw.h" AVIFileInit -lavifil32
 enabled frei0r     && { check_header frei0r.h || die "ERROR: frei0r.h header not found"; }
-enabled gnutls     && require_pkg_config gnutls gnutls/gnutls.h gnutls_global_init
+enabled gnutls     && require  gnutls gnutls/gnutls.h gnutls_global_init -lgnutls -lgcrypt -lgpg-error -lws2_32
 enabled libaacplus && require  "libaacplus >= 2.0.0" aacplus.h aacplusEncOpen -laacplus
 enabled libass     && require_pkg_config libass ass/ass.h ass_library_init
 enabled libcelt    && require libcelt celt/celt.h celt_decode -lcelt0
@@ -3068,18 +3068,24 @@ enabled libdirac   && require_pkg_config dirac                          \
     "libdirac_decoder/dirac_parser.h libdirac_encoder/dirac_encoder.h"  \
     "dirac_decoder_init dirac_encoder_init"
 enabled libfaac    && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
-enabled libfreetype && require_pkg_config freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType
-enabled libgsm     && require  libgsm gsm/gsm.h gsm_create -lgsm
-enabled libmodplug && require  libmodplug libmodplug/modplug.h ModPlug_Load -lmodplug
+enabled libfreetype && { add_cflags -I/mingw/include/freetype2 &&
+                         require2 freetype2 "ft2build.h freetype/freetype.h" FT_Init_FreeType -lfreetype; }
+enabled libgsm     && require  libgsm gsm.h gsm_create -lgsm
+enabled libmodplug && require  libmodplug libmodplug/modplug.h ModPlug_Load -lmodplug -lstdc++
 enabled libmp3lame && require  "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
 enabled libnut     && require  libnut libnut.h nut_demuxer_init -lnut
 enabled libopencore_amrnb  && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb
 enabled libopencore_amrwb  && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb
-enabled libopencv  && require_pkg_config opencv opencv/cxcore.h cvCreateImageHeader
+enabled libopencv  && { check_lib opencv/cxcore.h cvCreateImageHeader -lcv210 -lcxcore210 -lflann -lopencv_lapack -lstdc++ ||
+                        check_lib opencv/cxcore.h cvCreateImageHeader -lopencv_imgproc220 -lopencv_core220 -lopencv_lapack -lstdc++ ||
+                        die "ERROR: libopencv not found"; }
 enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
 enabled libpulse && require_pkg_config libpulse-simple pulse/simple.h pa_simple_new
-enabled librtmp    && require_pkg_config librtmp librtmp/rtmp.h RTMP_Socket
-enabled libschroedinger && require_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
+enabled librtmp    && { check_lib librtmp/rtmp.h RTMP_Socket -lrtmp -lpolarssl -lwinmm -lws2_32 ||
+                        check_lib librtmp/rtmp.h RTMP_Socket -lrtmp -lgnutls -lgcrypt -lgpg-error -lwinmm -lws2_32 ||
+                        check_lib librtmp/rtmp.h RTMP_Socket -lrtmp -lssl -lcrypto -lwinmm -lws2_32 -lgdi32 ||
+                        die "ERROR: librtmp not found or RTMP_Socket() missing, librtmp version must be >= 2.2.f"; }
+enabled libschroedinger && require schroedinger-1.0 schroedinger/schro.h schro_init -lschroedinger-1.0 -lorc-0.4
 enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex
 enabled libstagefright_h264  && require_cpp libstagefright_h264 "binder/ProcessState.h media/stagefright/MetaData.h
     media/stagefright/MediaBufferGroup.h media/stagefright/MediaDebug.h media/stagefright/MediaDefs.h
diff --git a/ffmpeg.c b/ffmpeg.c
index e81936d..157caa1 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1426,7 +1426,7 @@ static void print_report(OutputFile *output_files,
     int64_t pts = INT64_MAX;
     static int64_t last_time = -1;
     static int qp_histogram[52];
-    int hours, mins, secs, us;
+    //int hours, mins, secs, us;
 
     if (!print_stats && !is_last_report)
         return;
@@ -1506,20 +1506,21 @@ static void print_report(OutputFile *output_files,
                                       ost->st->time_base, AV_TIME_BASE_Q));
     }
 
-    secs = pts / AV_TIME_BASE;
-    us = pts % AV_TIME_BASE;
-    mins = secs / 60;
-    secs %= 60;
-    hours = mins / 60;
-    mins %= 60;
+    //secs = pts / AV_TIME_BASE;
+    //us = pts % AV_TIME_BASE;
+    //mins = secs / 60;
+    //secs %= 60;
+    //hours = mins / 60;
+    //mins %= 60;
 
     bitrate = pts ? total_size * 8 / (pts / 1000.0) : 0;
 
     snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
-             "size=%8.0fkB time=", total_size / 1024.0);
-    snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
-             "%02d:%02d:%02d.%02d ", hours, mins, secs,
-             (100 * us) / AV_TIME_BASE);
+             "size=%8.0fkB time=%0.2f ", total_size / 1024.0, (double)pts / AV_TIME_BASE);
+    //         "size=%8.0fkB time=", total_size / 1024.0);
+    //snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
+    //         "%02d:%02d:%02d.%02d ", hours, mins, secs,
+    //         (100 * us) / AV_TIME_BASE);
     snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf),
              "bitrate=%6.1fkbits/s", bitrate);
 
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 95919a4..3e30359 100644
--- a/libavcodec/libgsm.c
+++ b/libavcodec/libgsm.c
@@ -28,7 +28,7 @@
 // The idiosyncrasies of GSM-in-WAV are explained at http://kbs.cs.tu-berlin.de/~jutta/toast.html
 
 #include "avcodec.h"
-#include <gsm/gsm.h>
+#include <gsm.h>
 
 // gsm.h misses some essential constants
 #define GSM_BLOCK_SIZE 33
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index a31195b..1b1c0ec 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -617,7 +617,7 @@ static const AVOption options[] = {
     { "psy-rd",        "Strength of psychovisual optimization, in <psy-rd>:<psy-trellis> format.", OFFSET(psy_rd), AV_OPT_TYPE_STRING,  {0 }, 0, 0, VE},
     { "rc-lookahead",  "Number of frames to look ahead for frametype and ratecontrol", OFFSET(rc_lookahead), AV_OPT_TYPE_INT, {-1 }, -1, INT_MAX, VE },
     { "weightb",       "Weighted prediction for B-frames.",               OFFSET(weightb),       AV_OPT_TYPE_INT,    {-1 }, -1, 1, VE },
-    { "weightp",       "Weighted prediction analysis method.",            OFFSET(weightp),       AV_OPT_TYPE_INT,    {-1 }, -1, INT_MAX, VE, "weightp" },
+    { "weightp",       "Weighted prediction analysis method.",            OFFSET(weightp),       AV_OPT_TYPE_INT,    { 0 }, -1, INT_MAX, VE, "weightp" },
     { "none",          NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_NONE},   INT_MIN, INT_MAX, VE, "weightp" },
     { "simple",        NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_SIMPLE}, INT_MIN, INT_MAX, VE, "weightp" },
     { "smart",         NULL, 0, AV_OPT_TYPE_CONST, {X264_WEIGHTP_SMART},  INT_MIN, INT_MAX, VE, "weightp" },
@@ -662,7 +662,7 @@ static const AVClass rgbclass = {
 
 static const AVCodecDefault x264_defaults[] = {
     { "b",                "0" },
-    { "bf",               "-1" },
+    { "bf",               "0" },
     { "flags2",           "0" },
     { "g",                "-1" },
     { "qmin",             "-1" },
diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index f7aa7fd..4ddc81c 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
@@ -202,6 +202,7 @@ static av_cold int xvid_encode_init(AVCodecContext *avctx)  {
     xvid_enc_create.num_zones = 0;
 
     xvid_enc_create.num_threads = avctx->thread_count;
+    xvid_enc_create.num_slices = avctx->slices;
 
     xvid_enc_create.plugins = plugins;
     xvid_enc_create.num_plugins = 0;
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 1d7ef38..e06efe8 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -195,6 +195,7 @@ static int set_string_number(void *obj, const AVOption *o, const char *val, void
             read_number(o, dst, NULL, NULL, &intnum);
             if      (cmd == '+') d = intnum | (int64_t)d;
             else if (cmd == '-') d = intnum &~(int64_t)d;
+            else if (buf[0] == '0' && buf[1] == 'x') d = strtoul(buf, NULL, 16);
         } else {
             read_number(o, dst, &num, &den, &intnum);
             if      (cmd == '+') d = notfirst*num*intnum/den + d;
diff --git a/tests/Makefile b/tests/Makefile
index 9c192b7..d8c8dd0 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -109,7 +109,7 @@ FATE_UTILS = base64 tiny_psnr
 
 TOOL = ffmpeg
 
-fate: $(FATE)
+fate test: $(FATE)
 
 $(FATE): $(TOOL)$(EXESUF) $(FATE_UTILS:%=tests/%$(HOSTEXESUF))
 	@echo "TEST    $(@:fate-%=%)"
