diff options
author | wm4 <wm4@nowhere> | 2015-06-18 18:39:46 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-06-18 18:39:46 +0200 |
commit | e00e9d651bf398a311cde1619eaa3a39f8f5b999 (patch) | |
tree | 0f9ddb101866a22f36878a0448ad7e3b1df99361 /video/decode/dec_video.c | |
parent | a87b18aa5a9126abf98c989625dd45a8623c6f17 (diff) | |
download | mpv-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.c')
-rw-r--r-- | video/decode/dec_video.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c index 0c733b0aa6..09da72579d 100644 --- a/video/decode/dec_video.c +++ b/video/decode/dec_video.c @@ -117,6 +117,7 @@ int video_get_colors(struct dec_video *d_video, const char *item, int *value) void video_uninit(struct dec_video *d_video) { mp_image_unrefp(&d_video->waiting_decoded_mpi); + mp_image_unrefp(&d_video->cover_art_mpi); if (d_video->vd_driver) { MP_VERBOSE(d_video, "Uninit video.\n"); d_video->vd_driver->uninit(d_video); |