[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)

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Sat Jan 3 11:23:41 CET 2009


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.



More information about the MPlayer-dev-eng mailing list