mpv/demux
wm4 c88ab96a78
video: warn user against FFmpeg's lies
I found that at least for mjpeg streams, FFmpeg will set packet pts/dts
anyway. The mjpeg raw video demuxer (along with some other raw formats)
has a "framerate" demuxer option which defaults to 25, so all mjpeg
streams will be played at 25 FPS by default.

mpv doesn't like this much. If AVFMT_NOTIMESTAMPS is set, it prints a
warning, that might print a bogus FPS value for the assumed framerate.
The code was originally written with the assumption that FFmpeg would
not set pts/dts for such formats, but since it does, the printed
estimated framerate will never be used. --fps will also not be used by
default in this situation.

To make this hopefully less confusing, explicitly state the situation
when the AVFMT_NOTIMESTAMPS flag is set, and give instructions how to
work it around.

Also, remove the warning in dec_video.c. We don't know what FPS it's
going to assume anyway. If there are really no timestamps in the stream,
it will trigger our normal missing pts workaround. Add the assumed FPS
there.

In theory, we could just clear packet timestamps if AVFMT_NOTIMESTAMPS
is set, and make up our own timestamps. That is non-trivial for advanced
video codecs like h264, so I'm not going there. For seeking and
buffering estimation the situation thus remains half-broken.

This is a mitigation for #5419.
2018-01-22 23:48:27 -08:00
..
codec_tags.c demux_mkv: remove incorrect comment 2017-06-03 23:23:35 +02:00
codec_tags.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
cue.c cue: accept lower-case cue commands 2017-01-24 08:57:51 +01:00
cue.h Relicense some non-MPlayer source files to LGPL 2.1 or later 2016-01-19 18:36:06 +01:00
demux.c ta: introduce talloc_dup() and use it in some places 2018-01-18 01:42:36 -08:00
demux.h demux: reword an outdated comment 2018-01-18 01:25:54 -08:00
demux_cue.c demux: get rid of DEMUXER_CTRL_GET_TIME_LENGTH 2017-06-20 14:22:10 +02:00
demux_disc.c demux_disc: fix bluray subtitle language retrieval 2017-07-16 19:02:35 +02:00
demux_edl.c demux: get rid of DEMUXER_CTRL_GET_TIME_LENGTH 2017-06-20 14:22:10 +02:00
demux_lavf.c video: warn user against FFmpeg's lies 2018-01-22 23:48:27 -08:00
demux_libarchive.c demux, stream: add option to prevent opening referenced files 2016-12-04 23:15:31 +01:00
demux_mf.c build: switch preliminary LGPL mode from v3 to v2.1 2017-10-05 15:57:30 +02:00
demux_mkv.c ta: introduce talloc_dup() and use it in some places 2018-01-18 01:42:36 -08:00
demux_mkv_timeline.c demux: get rid of DEMUXER_CTRL_GET_TIME_LENGTH 2017-06-20 14:22:10 +02:00
demux_null.c demux_null: mark as seekable 2018-01-06 14:42:22 -08:00
demux_playlist.c demux_playlist: support .url files 2017-11-12 15:51:48 +01:00
demux_rar.c demux, stream: add option to prevent opening referenced files 2016-12-04 23:15:31 +01:00
demux_raw.c demux_raw: change license to LGPL 2017-06-24 13:56:53 +02:00
demux_timeline.c demux_timeline: disable pointless packet cache for sub-demuxers 2017-12-10 06:37:49 +02:00
demux_tv.c demux_tv.c: add missing copyright header 2017-06-21 18:13:53 +02:00
ebml.c Fix various typos in log messages 2017-12-03 21:24:18 +01:00
ebml.h demux_mkv: rewrite packet reading to avoid 1 memcpy() 2017-11-05 18:13:34 +01:00
matroska.h ebml, matroska.h: change license to LGPL 2017-04-21 13:34:10 +02:00
packet.c demux_mkv: rewrite packet reading to avoid 1 memcpy() 2017-11-05 18:13:34 +01:00
packet.h demux_mkv: rewrite packet reading to avoid 1 memcpy() 2017-11-05 18:13:34 +01:00
stheader.h demux_mkv: add hack to pass along x264 version to decoder 2017-12-28 00:59:22 -07:00
timeline.c ytdl_hook, edl: implement pseudo-DASH support 2017-02-04 22:34:38 +01:00
timeline.h ytdl_hook, edl: implement pseudo-DASH support 2017-02-04 22:34:38 +01:00