From c4f58eee9ef0d6a90bdb306d27ea42fddb304f79 Mon Sep 17 00:00:00 2001 From: rfelker Date: Fri, 2 Dec 2005 19:43:36 +0000 Subject: muxer_lavf MUST be disabled by default until someone adds AVParser support to it. Otherwise users will generate files with totally nonsensical pts if they use B frames! (And they are already doing so -- see mplayer-users list!) If anyone wants to volunteer to add AVParser support, go right ahead! But until then, do not remove this check. :) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17080 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/muxer_lavf.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'libmpdemux') diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c index 8177712cc0..55a8a4c7ef 100644 --- a/libmpdemux/muxer_lavf.c +++ b/libmpdemux/muxer_lavf.c @@ -38,9 +38,11 @@ typedef struct { } muxer_stream_priv_t; static char *conf_format = NULL; +static int conf_allow_lavf = 0; m_option_t lavfopts_conf[] = { {"format", &(conf_format), CONF_TYPE_STRING, 0, 0, 0, NULL}, + {"i_certify_that_my_video_stream_does_not_use_b_frames", &conf_allow_lavf, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; @@ -296,6 +298,24 @@ int muxer_init_muxer_lavf(muxer_t *muxer) muxer_priv_t *priv; AVOutputFormat *fmt = NULL; char mp_filename[256] = "menc://stream.dummy"; + + mp_msg(MSGT_MUXER, MSGL_WARN, "** MUXER_LAVF *****************************************************************\n"); + if (!conf_allow_lavf) { + mp_msg(MSGT_MUXER, MSGL_FATAL, +"If you wish to use libavformat muxing, you must ensure that your video stream\n" +"does not contain B frames (out of order decoding) and specify:\n" +" -lavfopts i_certify_that_my_video_stream_does_not_use_b_frames\n" +"on the command line.\n"); + } else { + mp_msg(MSGT_MUXER, MSGL_WARN, +"You have certified that your video stream does not contain B frames.\n"); + } + mp_msg(MSGT_MUXER, MSGL_WARN, +"REMEMBER: MEncoder's libavformat muxing is presently broken and will generate\n" +"INCORRECT files in the presence of B frames. Moreover, due to bugs MPlayer\n" +"will play these INCORRECT files as if nothing were wrong!\n" +"*******************************************************************************\n"); + if (!conf_allow_lavf) return 0; priv = (muxer_priv_t *) calloc(1, sizeof(muxer_priv_t)); if(priv == NULL) -- cgit v1.2.3