[MPlayer-cvslog] r34249 - in trunk: DOCS/man/en/mplayer.1 libmpcodecs/vd_ffmpeg.c

reimar subversion at mplayerhq.hu
Mon Oct 24 19:44:14 CEST 2011


Author: reimar
Date: Mon Oct 24 19:44:13 2011
New Revision: 34249

Log:
Add a vd_ffmpeg option to make the decoder discard frames until the first
keyframe after startup or seek.
Restore the previous default behaviour since in actual playback scenarios
long delays are far more annoying than seeing a few broken frames.

Modified:
   trunk/libmpcodecs/vd_ffmpeg.c

Changes in other areas also in this revision:
Modified:
   trunk/DOCS/man/en/mplayer.1

Modified: trunk/libmpcodecs/vd_ffmpeg.c
==============================================================================
--- trunk/libmpcodecs/vd_ffmpeg.c	Mon Oct 24 18:22:10 2011	(r34248)
+++ trunk/libmpcodecs/vd_ffmpeg.c	Mon Oct 24 19:44:13 2011	(r34249)
@@ -91,6 +91,7 @@ static int lavc_param_vstats=0;
 static int lavc_param_idct_algo=0;
 static int lavc_param_debug=0;
 static int lavc_param_vismv=0;
+static int lavc_param_wait_keyframe=0;
 static int lavc_param_skip_top=0;
 static int lavc_param_skip_bottom=0;
 static int lavc_param_fast=0;
@@ -119,6 +120,9 @@ const m_option_t lavc_decode_opts_conf[]
     {"vstats"        , &lavc_param_vstats               , CONF_TYPE_FLAG    , 0, 0, 1, NULL},
     {"debug"         , &lavc_param_debug                , CONF_TYPE_INT     , CONF_RANGE, 0, 9999999, NULL},
     {"vismv"         , &lavc_param_vismv                , CONF_TYPE_INT     , CONF_RANGE, 0, 9999999, NULL},
+#ifdef CODEC_FLAG2_SHOW_ALL
+    {"wait_keyframe" , &lavc_param_wait_keyframe        , CONF_TYPE_FLAG    , 0, 0, CODEC_FLAG_PART, NULL},
+#endif
     {"st"            , &lavc_param_skip_top             , CONF_TYPE_INT     , CONF_RANGE, 0, 999, NULL},
     {"sb"            , &lavc_param_skip_bottom          , CONF_TYPE_INT     , CONF_RANGE, 0, 999, NULL},
     {"fast"          , &lavc_param_fast                 , CONF_TYPE_FLAG    , 0, 0, CODEC_FLAG2_FAST, NULL},
@@ -261,6 +265,9 @@ static int init(sh_video_t *sh){
     avctx->workaround_bugs= lavc_param_workaround_bugs;
     avctx->error_recognition= lavc_param_error_resilience;
     if(lavc_param_gray) avctx->flags|= CODEC_FLAG_GRAY;
+#ifdef CODEC_FLAG2_SHOW_ALL
+    if(!lavc_param_wait_keyframe) avctx->flags2 |= CODEC_FLAG2_SHOW_ALL;
+#endif
     avctx->flags2|= lavc_param_fast;
     avctx->codec_tag= sh->format;
     avctx->stream_codec_tag= sh->video.fccHandler;


More information about the MPlayer-cvslog mailing list