diff options
author | wm4 <wm4@nowhere> | 2016-09-09 10:59:09 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-09 12:27:41 +0200 |
commit | ea94b01e6b39857028b5511ffb2d42ca491cf111 (patch) | |
tree | dac7625acc93aada9b075800ea4b00ccf146e716 /player/video.c | |
parent | 5e30e7a04125e3c503160a76bbfe9361bff561fd (diff) | |
download | mpv-ea94b01e6b39857028b5511ffb2d42ca491cf111.tar.bz2 mpv-ea94b01e6b39857028b5511ffb2d42ca491cf111.tar.xz |
client API: make mpv_opengl_cb_uninit_gl() behavior slightly nicer
Instead of deselecting the video stream plainly, use the slightly more
robust error_on_track() function. Also give it an error code (although
I'm not sure if this one is confusing, it's better than the one before).
Diffstat (limited to 'player/video.c')
-rw-r--r-- | player/video.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/player/video.c b/player/video.c index 69f3d8cc9e..342ff66ce4 100644 --- a/player/video.c +++ b/player/video.c @@ -410,6 +410,10 @@ int init_video_decoder(struct MPContext *mpctx, struct track *track) d_video->header = track->stream; d_video->codec = track->stream->codec; d_video->fps = d_video->header->codec->fps; + + // Note: at least mpv_opengl_cb_uninit_gl() relies on being able to get + // rid of all references to the VO by destroying the VO chain. Thus, + // decoders not linked to vo_chain must not use the hwdec context. if (mpctx->vo_chain) d_video->hwdec_devs = mpctx->vo_chain->hwdec_devs; |