[vlc-devel] Real Video Decoding....

Jean-Paul Saman jean-paul.saman at planet.nl
Tue Nov 6 10:07:20 CET 2007


Jean-Baptiste Kempf wrote:
> Hello,
> 
> Here attached is a patch that lied in the forum, made by a chinese guy.
> 
> The modifications I made are minimal.
> 
> Here are my first remarks on the patch.
> 
> 1) In the
> static int load_syms_linux function
> * l.157, it should return 0 and not NULL.
> * l.168 it shouldn't return a void* in a int function
> 
> Or maybe the function should just be of a void* type.
> 
> 2. Line 218, it calls 'load_syms' which is just defined on windows and 
> not linux. So the #ifdef WIN32 are wrongly placed.
> 
> 3. l.93 is useless.
> 
> 4. rvyuv_hive_message is useless (l.83) and probably the windows 
> contrepart of the function too.
> 
> 5. patch is attached :D
> 
> Have a nice day. 'coin coin'

This patch is messed up bigtime. I counted 3 times it assigns 
p_dec->pf_decode_video. It mallocs p_sys in an unusual place, which 
propably makes the handling of p_dec->p_sys far from stable.

Other remarks:
- don't use // comments in c code, but /* .. */
- coding style if( ) iso if () etc.
- cleanup of code flow, especially handling of p_sys
- on fail of malloc it should return VLC_ENOMEM iso VLC_EGENEREIC
- removal of dead code

For the rest it looks quite ok.

BTW I don't have time to cleanup this patch, so I guess one of the win 
devs should do this. Trax maybe?

Gtz,
Jean-Paul Saman.



More information about the vlc-devel mailing list