[MPlayer-dev-eng] [PATCH] demuxer-independent attachments
Nico Sabbi
Nicola.Sabbi at poste.it
Tue Jan 8 12:06:06 CET 2008
Il Tuesday 08 January 2008 11:54:45 Uoti Urpala ha scritto:
> On Tue, 2008-01-08 at 11:42 +0100, Nico Sabbi wrote:
> > Il Tuesday 08 January 2008 11:35:49 Uoti Urpala ha scritto:
> > > Which cleanup code are you talking about? The only cleanup I
> > > see in this patch is freeing the attachment data, and having
> > > that in the demuxer layer should be perfectly OK - nothing
> > > codec-specific about it.
> >
> > I was talking generically about init() and uninit() functions
>
> Well I still don't see what initialization and uninitialization
> your comment would apply to here. Demuxer layer sets up the
> attachment data and frees it when the demuxer is destroyed. Higher
> level code uses that data and deals with the semantics of it. Looks
> fine to me.
>
in Evgeniy's patch the block
+#ifdef USE_ASS
+ if (ass_enabled && ass_library) {
+ for (i = 0; i < demuxer->num_attachments; ++i) {
+ demux_attachment_t* att = demuxer->attachments + i;
+ if (extract_embedded_fonts &&
+ att->name && att->type && att->data && att->data_size &&
+ (strcmp(att->type, "application/x-truetype-font") == 0 ||
+ strcmp(att->type, "application/x-font") == 0))
+ ass_add_font(ass_library, att->name, att->data,
att->data_size);
+ }
+ }
+#endif
+
would end up in demux_open_stream()
and
+#ifdef USE_ASS
+#include "libass/ass.h"
+#include "libass/ass_mp.h"
+#endif
in demuxer.h is equally unclean, IMO
More information about the MPlayer-dev-eng
mailing list