summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-10 18:55:31 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-05-10 18:55:31 +0000
commit5d0b576f704f04e7573edf6f5cbbd375455c52b4 (patch)
treed95c781e1ceab44bf33b542891fe0c72a27a7703 /libmpcodecs
parent57a3542801f005eac35ea671d3c6356380323dc1 (diff)
downloadmpv-5d0b576f704f04e7573edf6f5cbbd375455c52b4.tar.bz2
mpv-5d0b576f704f04e7573edf6f5cbbd375455c52b4.tar.xz
AVOptions support for libavcodec based video decoders.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26724 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd_ffmpeg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libmpcodecs/vd_ffmpeg.c b/libmpcodecs/vd_ffmpeg.c
index 97a4fa62cd..8f5cb7ca08 100644
--- a/libmpcodecs/vd_ffmpeg.c
+++ b/libmpcodecs/vd_ffmpeg.c
@@ -6,6 +6,7 @@
#include "config.h"
#include "mp_msg.h"
#include "help_mp.h"
+#include "av_opts.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
@@ -86,6 +87,7 @@ static char *lavc_param_skip_idct_str = NULL;
static char *lavc_param_skip_frame_str = NULL;
static int lavc_param_threads=1;
static int lavc_param_bitexact=0;
+static char *lavc_avopt = NULL;
const m_option_t lavc_decode_opts_conf[]={
{"bug", &lavc_param_workaround_bugs, CONF_TYPE_INT, CONF_RANGE, -1, 999999, NULL},
@@ -107,6 +109,7 @@ const m_option_t lavc_decode_opts_conf[]={
{"skipframe", &lavc_param_skip_frame_str, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"threads", &lavc_param_threads, CONF_TYPE_INT, CONF_RANGE, 1, 8, NULL},
{"bitexact", &lavc_param_bitexact, CONF_TYPE_FLAG, 0, 0, CODEC_FLAG_BITEXACT, NULL},
+ {"o", &lavc_avopt, CONF_TYPE_STRING, 0, 0, 0, NULL},
{NULL, NULL, 0, 0, 0, 0, NULL}
};
@@ -312,6 +315,15 @@ static int init(sh_video_t *sh){
avctx->skip_loop_filter = str2AVDiscard(lavc_param_skip_loop_filter_str);
avctx->skip_idct = str2AVDiscard(lavc_param_skip_idct_str);
avctx->skip_frame = str2AVDiscard(lavc_param_skip_frame_str);
+
+ if(lavc_avopt){
+ if(parse_avopts(avctx, lavc_avopt) < 0){
+ mp_msg(MSGT_DECVIDEO,MSGL_ERR, "Your options /%s/ look like gibberish to me pal\n", lavc_avopt);
+ uninit(sh);
+ return 0;
+ }
+ }
+
mp_dbg(MSGT_DECVIDEO,MSGL_DBG2,"libavcodec.size: %d x %d\n",avctx->width,avctx->height);
switch (sh->format) {
case mmioFOURCC('S','V','Q','3'):