[vlc-devel] picture_Copy and p_sys

Jeff J complexzeros at gmail.com
Tue Mar 10 22:47:13 CET 2015

I don't think I understand. This is my code. Should
previous_picture->p_sys still be null after picture_Copy?

// vout->p->displayed.current->p_sys is non-null
previous_picture = picture_NewFromFormat(&vout->p->displayed.current->format);
picture_Copy(previous_picture, vout->p->displayed.current);
// previous_picture->p_sys is still null

On Tue, Mar 10, 2015 at 2:52 PM, Rémi Denis-Courmont <remi at remlab.net> wrote:
> Le mardi 10 mars 2015, 14:50:45 Jeff J a écrit :
>> I'm trying to save a buffer of some pictures (I'm working in
>> video_output.c). When I do picture_Copy it doesn't copy the p_sys member of
>> picture_t. I can't copy it manually because picture_sys_t is an incomplete
>> type. Is there a preferred way to copy p_sys so I can save a picture_t for
>> displaying later?
> picture_tp_sys is tied to the allocator of the picture. If you copy the
> picture, you allocate it, so you have to have your own p_sys.
> At least that is how it is currently supposed to work.
> --
> Rémi Denis-Courmont
> http://www.remlab.net/

More information about the vlc-devel mailing list