diff --git a/configure b/configure
index c54706a..d7745ae 100755
--- a/configure
+++ b/configure
@@ -2916,15 +2916,19 @@ enabled libdirac   && require_pkg_config dirac                          \
     "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 libgsm     && require  libgsm gsm.h gsm_create -lgsm
 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++ ||
+                        die "ERROR: libopencv not found"; }
 enabled libopenjpeg && require libopenjpeg openjpeg.h opj_version -lopenjpeg
-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 -lssl -lcrypto -lwinmm -lws2_32 -lgdi32 ||
+                        die "ERROR: librtmp not found or RTMP_Socket() missing, librtmp version must be >= 2.2.f"; }
+enabled libschroedinger && { check_lib schroedinger/schro.h schro_init -lschroedinger-1.0 -lorc-0.4 ||
+                             die "ERROR: libschroedinger not found"; }
 enabled libspeex   && require  libspeex speex/speex.h speex_decoder_init -lspeex
 enabled libtheora  && require  libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg
 enabled libvo_aacenc && require libvo_aacenc vo-aacenc/voAAC.h voGetAACEncAPI -lvo-aacenc
diff --git a/libavcodec/libgsm.c b/libavcodec/libgsm.c
index 1f76f82..2040fb5 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 28683a9..2d79eeb 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -267,6 +267,7 @@ static av_cold int X264_init(AVCodecContext *avctx)
     x4->params.analyse.i_direct_mv_pred  = avctx->directpred;
 
     x4->params.analyse.b_weighted_bipred = avctx->flags2 & CODEC_FLAG2_WPRED;
+    x4->params.analyse.i_weighted_pred = avctx->weighted_p_pred;
 
     if (avctx->me_method == ME_EPZS)
         x4->params.analyse.i_me_method = X264_ME_DIA;
@@ -304,8 +305,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
     x4->params.rc.f_pb_factor             = avctx->b_quant_factor;
     x4->params.analyse.i_chroma_qp_offset = avctx->chromaoffset;
 
-    if (!x4->preset)
-        check_default_settings(avctx);
+    //if (!x4->preset)
+    //    check_default_settings(avctx);
 
     if (x4->preset || x4->tune) {
         if (x264_param_default_preset(&x4->params, x4->preset, x4->tune) < 0)
diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c
index 6fb3624..818c431 100644
--- a/libavformat/rmdec.c
+++ b/libavformat/rmdec.c
@@ -305,7 +305,7 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
             return ret;
 
 //        av_log(s, AV_LOG_DEBUG, "fps= %d fps2= %d\n", fps, fps2);
-        st->codec->time_base.den = fps * st->codec->time_base.num;
+        st->codec->time_base.den = fps2 * st->codec->time_base.num;
         //XXX: do we really need that?
         switch(st->codec->extradata[4]>>4){
         case 1: st->codec->codec_id = CODEC_ID_RV10; break;
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 8f2d9a6..ad1afb8 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -180,6 +180,7 @@ int av_set_string3(void *obj, const char *name, const char *val, int alloc, cons
             if (o->type == FF_OPT_TYPE_FLAGS) {
                 if      (cmd=='+') d= av_get_int(obj, name, NULL) | (int64_t)d;
                 else if (cmd=='-') d= av_get_int(obj, name, NULL) &~(int64_t)d;
+                else if (buf[0]=='0' && buf[1]=='x') d= strtoul(buf, NULL, 16);
             } else {
                 if      (cmd=='+') d= notfirst*av_get_double(obj, name, NULL) + d;
                 else if (cmd=='-') d= notfirst*av_get_double(obj, name, NULL) - d;
