[vlc-devel] Re: [PATCH] Matroska Attachments
Laurent Aimar
fenrir at via.ecp.fr
Wed May 30 22:07:33 CEST 2007
Hi,
On Wed, May 30, 2007, Bernie Purcell wrote:
> I don't know where else I could put it. It is a struct returned from a
> container demuxer (ie. other container formats besides MKV support
> attachments) and it is a control message to the demuxer that returns it.
I am no against adding such a functionnality but I do not like the way
you retreive such attachment from subsdec.c.
It's a decoder and your are directly calling demux2_Control.
Such thing is forbidden and may cause segfault. (demux2_Control can only
be called by src/input/*.c, and decoder are in there own thread...)
Beside you can have more than 1 demuxer per input.
I think the right way would be to directly send them to the subs decoder
through es_format_t.
All we need would be to extend es_format_t.subs_format_t like this:
int i_attachment;
vlc_attachment_t **attachment;
And then mkv should just fill it on open.
(Of course es_format_Init/Copy/Clean should handle this new fields)
I am not sure where vlc_attachment_t should be defined but vlc_es.h will
be enougth to start with.
What do you think ?
--
fenrir
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list