mirror of
https://github.com/mpv-player/mpv
synced 2025-03-01 20:00:37 +00:00
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
This commit is contained in:
parent
6a3353a1e9
commit
c4f58eee9e
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user