mpv/video
wm4 5e50fe3049 demux_mkv: add hack to pass along x264 version to decoder
This fixes when resuming certain broken h264 files encoded by x264. See
FFmpeg commit 840b41b2a643fc8f0617c0370125a19c02c6b586 about the x264
bug itself.

Normally, the unregistered user data SEI (that contains the x264 version
string) is informational only. But libavcodec uses it to workaround a
x264 bug, which was recently fixed in both libavcodec and x264. The fact
that both encoder and decoder were buggy is the reason that it was not
found earlier, and there are apparently a lot of files around created by
the broken decoder. If libavcodec sees the SEI, this bug can be worked
around by using the old behavior.

If you resume a file with mpv (i.e. seeking when the file loads),
libavcodec never sees the first video packet. Consequently it has to
assume the file is not broken, and never applies the workaround,
resulting in garbage being played.

Fix this by always feeding the first video packet to the decoder on
init, and then flushing the codec (to avoid that an unwanted image is
output). Flushing the codec does not remove info such as the x264
version. We also abuse the fact that the first avcodec_send_packet()
always pushes the frame into the decoder (so we don't have to trigger
the decoder by requsting an output frame).
2017-12-28 00:59:22 -07:00
..
decode demux_mkv: add hack to pass along x264 version to decoder 2017-12-28 00:59:22 -07:00
filter vf_vdpaupp: fix error handling and software input mode 2017-12-27 01:52:09 -07:00
out player: add internal `vo-resize` command 2017-12-27 14:29:15 -07:00
csputils.c csputils: Add support for Display P3 primaries 2017-12-14 23:31:09 +02:00
csputils.h csputils: Add support for Display P3 primaries 2017-12-14 23:31:09 +02:00
d3d.c video: move d3d.c out of decode sub directory 2017-12-01 17:58:56 +01:00
d3d.h video: move d3d.c out of decode sub directory 2017-12-01 17:58:56 +01:00
fmt-conversion.c Add DRM_PRIME Format Handling and Display for RockChip MPP decoders 2017-10-23 21:07:24 +02:00
fmt-conversion.h
hwdec.c video: remove some more hwdec legacy stuff 2017-12-02 04:53:55 +01:00
hwdec.h hwdec: remove unused fields 2017-12-21 19:31:36 +01:00
image_loader.c x11: load icon differently 2017-07-01 15:56:12 +02:00
image_loader.h x11: load icon differently 2017-07-01 15:56:12 +02:00
image_writer.c Replace remaining avcodec_close() calls 2017-07-16 12:51:48 +02:00
image_writer.h
img_format.c img_format: remove some guards against old ffmpeg API 2017-11-06 17:14:01 +01:00
img_format.h Add DRM_PRIME Format Handling and Display for RockChip MPP decoders 2017-10-23 21:07:24 +02:00
mp_image.c vd_lavc, mp_image: remove weird mpv specific palette constant 2017-12-01 22:03:38 +01:00
mp_image.h vd_lavc, mp_image: remove weird mpv specific palette constant 2017-12-01 22:03:38 +01:00
mp_image_pool.c video: fix memory leaks with hwdec copy modes 2017-12-01 08:01:41 +01:00
mp_image_pool.h vf_vavpp: use libavutil hw frames API for frame pool and upload 2017-09-29 18:17:51 +02:00
sws_utils.c build: add preliminary LGPL mode 2017-09-21 13:56:27 +02:00
sws_utils.h video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
vaapi.c hwdec: remove unused fields 2017-12-21 19:31:36 +01:00
vaapi.h video: refactor hw device creation for hwdec copy modes 2017-12-01 08:05:16 +01:00
vdpau.c hwdec: remove unused fields 2017-12-21 19:31:36 +01:00
vdpau.h vd_lavc, vdpau, vaapi: restore emulated API avoidance 2017-12-02 04:53:51 +01:00
vdpau_functions.inc
vdpau_mixer.c video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00
vdpau_mixer.h video: redo video equalizer option handling 2017-08-22 17:01:35 +02:00