[MPlayer-dev-eng] [PATCH] Fix deinit problem due to r28215 (was Re: [MPlayer-cvslog] r28215 - in trunk: DOCS/man/en/mplayer.1 libvo/vo_macosx.m)

Guillaume POIRIER poirierg at gmail.com
Sat Jan 3 23:07:46 CET 2009


Hello,

On Sat, Jan 3, 2009 at 11:23 AM, Reimar Döffinger
<Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> On Fri, Jan 02, 2009 at 10:00:14PM +0100, Guillaume POIRIER wrote:
>> How's that patch
>
> -       if (strcmp(buffer_name, DEFAULT_BUFFER_NAME))
> +       if (buffer_name) {
>                shared_buffer = true;
> -
> +       }
> +
> +       if (!buffer_name && shared_buffer) {
> +               buffer_name = strdup(DEFAULT_BUFFER_NAME);
> +       }
>
> I'd tend to set buffer_name shared_buffer regardless whether
> shared_buffer is set or not, but at least you already check buffer_name,
> you should use "else" or "else if (shared_buffer)" instead of
> duplicating the check IMHO.
> But the principle looks right.

Nice feedback. New patch attached.

Guillaume
-- 
Only a very small fraction of our DNA does anything; the rest is all
comments and ifdefs.

Eddie Izzard  - "I grew up in Europe, where the history comes from."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buffer_name_is_on_heap.1.diff
Type: application/octet-stream
Size: 698 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20090103/88cb81bb/attachment.obj>


More information about the MPlayer-dev-eng mailing list