summaryrefslogtreecommitdiffstats
path: root/video/decode/dec_video.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-06-18 18:39:46 +0200
committerwm4 <wm4@nowhere>2015-06-18 18:39:46 +0200
commite00e9d651bf398a311cde1619eaa3a39f8f5b999 (patch)
tree0f9ddb101866a22f36878a0448ad7e3b1df99361 /video/decode/dec_video.h
parenta87b18aa5a9126abf98c989625dd45a8623c6f17 (diff)
downloadmpv-e00e9d651bf398a311cde1619eaa3a39f8f5b999.tar.bz2
mpv-e00e9d651bf398a311cde1619eaa3a39f8f5b999.tar.xz
player: make decoding cover art more robust
When showing cover art, the decoding logic pretends that the source has an infinite number of frames. This slightly simplifies dealing with filter data flow. It was done by feeding the same packet repeatedly to the decoder (each decode run produces new output). Change this by decoding once at the video initialization. This is easier to follow, and increases robustness in case of broken images. Usually, we try to tolerate decoding errors, so decoding normally continues, but in this case it would just burn the CPU for no reason. Fixes #2056.
Diffstat (limited to 'video/decode/dec_video.h')
-rw-r--r--video/decode/dec_video.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/video/decode/dec_video.h b/video/decode/dec_video.h
index 5ab7213ee7..69e2a44e40 100644
--- a/video/decode/dec_video.h
+++ b/video/decode/dec_video.h
@@ -43,6 +43,8 @@ struct dec_video {
struct mp_image *waiting_decoded_mpi;
struct mp_image_params decoder_output; // last output of the decoder
+ struct mp_image *cover_art_mpi;
+
void *priv; // for free use by vd_driver
// Last PTS from decoder (set with each vd_driver->decode() call)