summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authorrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-02 19:43:36 +0000
committerrfelker <rfelker@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-12-02 19:43:36 +0000
commitc4f58eee9ef0d6a90bdb306d27ea42fddb304f79 (patch)
tree9bc9824b9598f48592a9d2544c64461a1a66332a /libmpdemux
parent6a3353a1e90c94367994225e4e142bc56aed89d9 (diff)
downloadmpv-c4f58eee9ef0d6a90bdb306d27ea42fddb304f79.tar.bz2
mpv-c4f58eee9ef0d6a90bdb306d27ea42fddb304f79.tar.xz
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
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/muxer_lavf.c20
1 files changed, 20 insertions, 0 deletions
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)