Page 1 of 1

please check about es_out.c

Posted: 02 Feb 2011 11:28
by JoungEunKim
Hi.

Please check about /src/input/es_out.c

LineNo 2743.

if( *pl->psz_native_name ) <--- this is not right.
{
return strdup( pl->psz_native_name );
}
return strdup( pl->psz_eng_name ); <--- it need check about null.

I change like this.

if( pl->psz_native_name ) <--- I think this is OK.
{
return strdup( pl->psz_native_name );
}
if (pl->psz_eng_name) <--- null check.
return strdup( pl->psz_eng_name );
return NULL;

Am I right? (I'm not sure... )
Please check it. :)

Bye!!!

Re: please check about es_out.c

Posted: 02 Feb 2011 12:33
by MidnightCoder
I confirmed the change suggested by JoungEunKim is needed for VLC1.16 (source downloaded frrom here) to work on certain type of files. This is true for VLC compiled using Visual Studio but the above change doesn't look like it would be related to the compiler? I'm not a C/C++ programmer and "pointers" have long been forgotten for me so I might be wrong :)

Re: please check about es_out.c

Posted: 02 Feb 2011 16:08
by RĂ©mi Denis-Courmont
So the question is whether psz_native_name is an empty string or a NULL pointer. You should bring this on vlc-devel@videolan.org ...

Re: please check about es_out.c

Posted: 02 Feb 2011 20:16
by MidnightCoder
How do I "bring this issue to" that group? Just email that group address or there is a different place to go to? I'm also finding out some potential bugs in vlc_mutex_lock() since version 1.1.0 and it hasn't been fixed as of v1.17.

Re: please check about es_out.c

Posted: 02 Feb 2011 21:14
by sherington
How do I "bring this issue to" that group? Just email that group address or there is a different place to go to?
Just subscribe and send your email:

http://mailman.videolan.org/listinfo/vlc-devel

Re: please check about es_out.c

Posted: 05 Mar 2011 05:58
by Henry.L-C
Hi,
I'm new to vlc, trying to integrated libvlc into a PVR project of mine.
I ran into the same problem with es_out.c under vs2010. I think I found a fix:
In the file vlc_iso_lang.h I found this:

struct iso639_lang_t
{
const char *psz_eng_name; /* Description in English */
const char *psz_native_name; /* Description in native language */
const char psz_iso639_1[3]; /* ISO-639-1 (2 characters) code */
const char psz_iso639_2T[4]; /* ISO-639-2/T (3 characters) English code */
const char psz_iso639_2B[4]; /* ISO-639-2/B (3 characters) native code */
};

I believe the const forces the pointers and strings in the struct to remain NULL . So when you try initialize p_languages in file iso-639_def.h all the values are set to NULL. Removing the const from the pointers char arrays appears to have fixed this. Try it out and let me know what you think.

Henry...