diff options
author | wm4 <wm4@nowhere> | 2017-01-10 16:49:06 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-10 16:49:06 +0100 |
commit | c000b37e9abd926fffff79c4f3056e1700a0e849 (patch) | |
tree | f89252e5356f97383a85ff4faef46470f3f45e67 /video/decode/lavc.h | |
parent | ed937b6eca269c653fcaa39db14c2623dd3d2862 (diff) | |
download | mpv-c000b37e9abd926fffff79c4f3056e1700a0e849.tar.bz2 mpv-c000b37e9abd926fffff79c4f3056e1700a0e849.tar.xz |
vd_lavc: complicated improved fallback behavior for --hwdec=cuda
The ffmpeg cuda wrappers need more than 1 packet for determining whether
hw decoding will work. So do something complicated and keep up to 32
packets when trying to do hw decoding, and replay the packets on the
software decoder if it doesn't work.
This code was written in a delirious state, testing for regressions and
determining whether this is worth the trouble will follow later. All mpv
git users are alpha testers as of this moment.
Fixes #3914.
Diffstat (limited to 'video/decode/lavc.h')
-rw-r--r-- | video/decode/lavc.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/video/decode/lavc.h b/video/decode/lavc.h index 4f590fa52a..a28aa0385b 100644 --- a/video/decode/lavc.h +++ b/video/decode/lavc.h @@ -30,7 +30,12 @@ typedef struct lavc_ctx { // For HDR side-data caching double cached_hdr_peak; - struct demux_packet *prev_packet; + bool hw_probing; + struct demux_packet **sent_packets; + int num_sent_packets; + + struct demux_packet **requeue_packets; + int num_requeue_packets; struct mp_image **delay_queue; int num_delay_queue; |