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

Guillaume POIRIER poirierg at gmail.com
Sun Sep 11 14:41:44 CEST 2005


Hi,

On 9/7/05, Michael Krasnicki <kraz_subscribe at yahoo.com> wrote:
> Hi,
> 
> As request, attached please find my patch in unified diff
> format. Please let me know if the patch requires any
> additional changes.

+static vobsub_out_t *
+vobsub_out_create_struct()
+{
+   vobsub_out_t *vob = malloc(sizeof(vobsub_out_t));

It does seem like you do free this pointer when need, but I'm not
quite sure. Could you double check that that code won't leak?

Maybe you could add doxygen comments about this function, and the
others that you add.


     filename = malloc(strlen(basename) + 5);
     if (filename) {
-	result = malloc(sizeof(vobsub_out_t));
-	result->fsub = NULL;
-	result->fidx = NULL;
-	result->aid = 0;
+        result = vobsub_out_create_struct();
+        result->forced_subs_only = forced_subs_only;


The indentation style is not consistent. The removed lines used tabs,
when those 2 added line use spaces. I don't think that's all that
important as the rest of the file is not consistent either.

As you can see, all those are very minor nits. That code does seem to
do what it's supposed to, though I have not tested it much.

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




More information about the MPlayer-dev-eng mailing list