[MPlayer-dev-eng] Re: [PATCH]Unicode support for ASF demuxer

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Dec 2 20:00:23 CET 2006


Hello,
On Tue, Nov 28, 2006 at 04:23:07PM +0800, Zuxy Meng wrote:
> 2006/11/28, Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de>:
> >At the same place and in the same way as it is done now, just merge the
> >malloc and the call to this function.
> >
> >The goal is patch readability, if anything you would have had to leave
> >the print_asf_string function there, but this hardly makes any sense, so
> >just do it properly IMO, that version would just make both the patch and
> >the resulting code harder to understand.
> 
> See if this one is better:-)

Quite nice, thanks.

>  #include "config.h"
> +#include "common.h"

We use "libavutil/common.h" in other places now.

> +  if (!outbuf) {
> +    mp_msg(MSGT_HEADER, MSGL_ERR, MSGTR_MemAllocFailed);
> +    return NULL;
>    }

I won't object if you want to keep it, but note that this is quite pointless
IMO since it will crash anyway on strdup in demux_info_add, and
printf/mp_msg is allowed (and on some systems will) crash, too.

Greetings,
Reimar Döffinger



More information about the MPlayer-dev-eng mailing list