[vlc-devel] [PATCH 4/7] video_output: also check that the prerendered picture is not late

Steve Lhomme robux4 at ycbcr.xyz
Thu Oct 22 08:00:52 CEST 2020


On 2020-10-20 11:04, Steve Lhomme wrote:
> The static filter may be slow and the returned picture may be late. If the
> filtered picture is dropped we keep looping to find a non NULL filtered picture
> or no picture at all.
> ---
>   src/video_output/video_output.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c
> index beb2bf21e16..96919d320db 100644
> --- a/src/video_output/video_output.c
> +++ b/src/video_output/video_output.c
> @@ -1147,6 +1147,8 @@ static picture_t *ThreadGetPrerenderedLocked(vout_thread_sys_t *vout, bool reuse
>           sys->displayed.is_interlaced = !decoded->b_progressive;
>   
>           picture = filter_chain_VideoFilter(sys->filter.chain_static, sys->displayed.decoded);
> +        if (DropLate(vout, picture, can_drop_late, paused))

Missing a check on NULL picture.

This also has a side effect on some filters like deinterlacing (or 
theoretically stereoscopic with frame sequential source) that receive 
fields separately. They expect to get one decoded picture after the 
previous field (or eye). If one of them is dropped, it messes the 
algorithm is the picture doesn't tell which field/eye it is.

Given some decoded pictures may also be missing out of the decoder (bad 
reception, damaged file, etc) a correct way to handle this would be to 
signal which field (eye) the picture is. But if 2 pictures are missing 
that's still not good enough.

So we should inform the filters that the source has a discontinuity (or 
that it should drop it's history). That means we also need this 
information from decoders.

> +            picture = NULL;
>       }
>   
>       return picture;
> -- 
> 2.26.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list