please check about es_out.c

This forum is about all development around libVLC.
JoungEunKim
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 10 Dec 2009 00:21

please check about es_out.c

Postby JoungEunKim » 02 Feb 2011 11:28

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!!!

MidnightCoder
Blank Cone
Blank Cone
Posts: 82
Joined: 08 Aug 2008 06:04

Re: please check about es_out.c

Postby MidnightCoder » 02 Feb 2011 12:33

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

Rémi Denis-Courmont
Developer
Developer
Posts: 15229
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: please check about es_out.c

Postby Rémi Denis-Courmont » 02 Feb 2011 16:08

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 ...
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

MidnightCoder
Blank Cone
Blank Cone
Posts: 82
Joined: 08 Aug 2008 06:04

Re: please check about es_out.c

Postby MidnightCoder » 02 Feb 2011 20:16

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.

sherington
Cone that earned his stripes
Cone that earned his stripes
Posts: 491
Joined: 10 Sep 2008 11:57
VLC version: master
Operating System: Linux

Re: please check about es_out.c

Postby sherington » 02 Feb 2011 21:14

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

Henry.L-C
New Cone
New Cone
Posts: 1
Joined: 05 Mar 2011 04:32

Re: please check about es_out.c

Postby Henry.L-C » 05 Mar 2011 05:58

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...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 4 guests