Skip to content
Snippets Groups Projects
Commit 17efaa77 authored by Steve Lhomme's avatar Steve Lhomme Committed by Thomas Guillem
Browse files

video_output: reinit the vout if the crop changes


If you play a file that has the same decoder size but different display size
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 the
pictures in each picture pool dynamically. It cannot just be handled on the
vout side as some decoders and filters rely on i_visible/offset to copy
only the required data (for example lavc_CopyPicture).

Fixes #19268

Signed-off-by: default avatarThomas Guillem <thomas@gllm.fr>
parent 24b436c8
No related branches found
No related tags found
No related merge requests found
......@@ -1545,8 +1545,12 @@ static int ThreadReinit(vout_thread_t *vout,
ThreadClean(vout);
return VLC_EGENERIC;
}
/* We ignore crop/ar changes at this point, they are dynamically supported */
VideoFormatCopyCropAr(&vout->p->original, &original);
/* We ignore ar changes at this point, they are dynamically supported.
* #19268: don't ignore crop changes (fix vouts using the crop size of the
* previous format). */
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment