[vlc-devel] [PATCH] [RFC] video_output: reinit the vout is the display area of pictures have changed

Rémi Denis-Courmont remi at remlab.net
Tue Dec 12 14:51:10 CET 2017

Le 12 décembre 2017 15:13:18 GMT+02:00, Steve Lhomme <robux4 at videolabs.io> a écrit :
>If you play a file that has the same decoder size but different display
>consecutively, the decoder picture pool needs to be updated so that the
>i_visible_lines of each picture plane matches the new picture format.
>The easiest way is to reinit the vout. Another way would be to update
>pictures in each picture pool dynamically. It cannot just be handled on
>vout side as some decoders and filters rely on i_visible/offset to copy
>only the required data (for example lavc_CopyPicture).
>Fixes #19268
> src/video_output/video_output.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>diff --git a/src/video_output/video_output.c
>index 0088ee9cca..6963c786ac 100644
>--- a/src/video_output/video_output.c
>+++ b/src/video_output/video_output.c
>@@ -1546,7 +1546,8 @@ static int ThreadReinit(vout_thread_t *vout,
>         return VLC_EGENERIC;
>     }
>/* We ignore crop/ar changes at this point, they are dynamically
>supported */
>-    VideoFormatCopyCropAr(&vout->p->original, &original);
>+    vout->p->original.i_sar_num = original.i_sar_num;
>+    vout->p->original.i_sar_den = original.i_sar_den;
>     if (video_format_IsSimilar(&original, &vout->p->original)) {
>         if (cfg->dpb_size <= vout->p->dpb_size) {
>             video_format_Clean(&original);
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:

I am not sure I understand the patch description. And in any case, it does not seem to match the preexisting code comment.
Remi Denis-Courmont

More information about the vlc-devel mailing list