[MPlayer-dev-eng] [PATCH] mencoder vobsub out patch

Guillaume POIRIER poirierg at gmail.com
Thu Sep 15 10:09:36 CEST 2005


Hi Michael,

On 9/15/05, Michael Krasnicki <kraz_subscribe at yahoo.com> wrote:
> Guillaume,
> 
> > +static vobsub_out_t *
> > +vobsub_out_create_struct()
> > +{
> > +   vobsub_out_t *vob = malloc(sizeof(vobsub_out_t));
> 
> The vobsub_out_t gets freed when function vobsub_out_close() is
> called in mencoder.c.

I "kind of" saw that... but I wanted to make sure that you'd double
check as that's the kind of nasty problem that is only avoided if you
put some brain juice into it. :-)


> I think that is fine but I will put some
> temporary debug in the code and check. BTW, I did not create
> vobsub_out_t and vobsub_out_close(). That already exists in the
> CVS version. I just added more data members to this struct.
> 
> But, as I was reviewing my code, I did find a different spot
> were the vobsub_out_t.overflow member can freed more than once
> because I do not reset the pointer to NULL. Ooops. I will fix
> that and post another patch over the weekend.

:-)


> Also, I can replace each set of 8 spaces at the beginning of each
> line with a tab if you want. This should make it consistent with
> the other code in that file.

Okay, nice :-)


> > Maybe you could add doxygen comments about this function, and the
> > others that you add.
> 
> Where can I find an example file in the mplayer source with the
> type of documentation that you are looking for?

The file DOCS/tech/code-documentation.txt in MPlayer source tree
should get you started.

The latest commit to ve_xvid4.c features some doxygen comments, and if
I'm not mistaken, vf_remove_logo.c does features such comments too.

Doxygen is not used on the whole source tree (the "old code" doesn't
use it), but newer code is expected to feature doxygen comments.

Guillaume
-- 
Reading doesn't hurt, really!
  -- Dominik 'Rathann' Mierzejewski




More information about the MPlayer-dev-eng mailing list