subpicture: initialize the region picture with the region format
The region format has its own copy of the palette, whereas the source may have a temporary pointer.
This is working most of the time as the region format is usually used to get the palette of a region. But this makes the code potentially crashing if just the region picture is used.
The same problem exists in 3.0. But in 4.0 the picture palette is more prioritary than the region one since 1b5faa0f.
Merge request reports
Activity
changed milestone to %4.0
added Component::Video: subpictures Status::BackportCandidate labels
added MRStatus::Reviewable label
added MRStatus::Acceptable label and removed MRStatus::Reviewable label
The bottom line to this is that any picture created uses a shallow copy of the video format: https://code.videolan.org/videolan/vlc/-/blob/444d71bf2affe6146c951708f2065ab3baccdfe1/src/misc/picture.c#L214
This is fine 99.9% of the time. But it's not when the video format has a palette. There are no
video_format_Clean()
calls in picture.c either, for that reason. We might fix that.mentioned in merge request !5060 (merged)
added MRStatus::Accepted label and removed MRStatus::Acceptable label
MR Acceptance result
This MergeRequest has been Accepted! Congratulations.MR acceptance checks details:
-
MR should be considered mergeable by Gitlab -
Last pipeline should be successful -
MergeRequest should have at least one external review and/or vote -
All threads should be resolved, and score >= 0 -
MergeRequest should have no activity (threads/votes) for (24h/24h)
-
added 24 commits
-
0a87625d...dfd6d83e - 23 commits from branch
videolan:master
- 33dd66bd - subpicture: initialize the region picture with the region format
-
0a87625d...dfd6d83e - 23 commits from branch
enabled an automatic merge when the pipeline for 33dd66bd succeeds