vlc | branch: master | Steve Lhomme <[email protected]> | Wed Jul 17 16:01:22 2019 +0200| [0453abddeeae5d69b5e85c1a41d6ae9b09ea0c71] | committer: Steve Lhomme
display: keep the video context to feed the converter locally It's the video context to use with vd->source. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0453abddeeae5d69b5e85c1a41d6ae9b09ea0c71 --- src/video_output/display.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/video_output/display.c b/src/video_output/display.c index eaaa4c3246..96bbb9e2cd 100644 --- a/src/video_output/display.c +++ b/src/video_output/display.c @@ -278,6 +278,7 @@ typedef struct { /* */ video_format_t source; + vlc_video_context *src_vctx; /* filters to convert the vout source to fmt, NULL means no conversion * can be done and nothing will be displayed */ filter_chain_t *converters; @@ -751,6 +752,8 @@ vout_display_t *vout_display_New(vlc_object_t *parent, osys->crop.num = 0; osys->crop.den = 0; + osys->src_vctx = vctx ? vlc_video_context_Hold( vctx ) : NULL; + /* */ vout_display_t *vd = &osys->display; video_format_Copy(&vd->source, source); @@ -767,7 +770,7 @@ vout_display_t *vout_display_New(vlc_object_t *parent, if (vlc_module_load(vd, "vout display", module, module && *module != '\0', vout_display_start, vd, &osys->cfg, - vctx) == NULL) + osys->src_vctx) == NULL) goto error; #if defined(__OS2__) @@ -800,6 +803,12 @@ void vout_display_Delete(vout_display_t *vd) { vout_display_priv_t *osys = container_of(vd, vout_display_priv_t, display); + if (osys->src_vctx) + { + vlc_video_context_Release( osys->src_vctx ); + osys->src_vctx = NULL; + } + if (osys->converters != NULL) filter_chain_Delete(osys->converters); _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
