<br>Fixed the p_aout check<br><br><div class="gmail_quote">On Fri, Jun 24, 2011 at 3:13 AM, akash mehrotra <span dir="ltr"><<a href="mailto:mehrotra.akash@gmail.com">mehrotra.akash@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class="gmail_quote"><div class="im">On Fri, Jun 24, 2011 at 3:05 AM, Laurent Aimar <span dir="ltr"><<a href="mailto:fenrir@elivagar.org" target="_blank">fenrir@elivagar.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div><br>
On Fri, Jun 24, 2011 at 02:56:11AM +0530, akash mehrotra wrote:<br>
> Some more minor fixes.<br>
> I hope its correct this time.<br>
<br>
</div>> @@ -51,6 +52,12 @@ static int vlclua_preamp_get( lua_State *L )<br>
> if( p_input )<br>
> {<br>
<div>> aout_instance_t *p_aout = input_GetAout( p_input );<br>
</div>> + char *psz_af = var_GetNonEmptyString( p_aout, "audio-filter" );<br>
> + if ( !p_aout || strstr ( psz_af, "equalizer" ) == NULL )<br>
The p_aout check seems badly placed, var_Get* should not be called on<br>
NULL objects.<br>
var_GetNonEmptyString will return NULL for empty strings, and then strstr()<br>
will probably segfault.<br>
<br>
(Same for the following ones).<br>
<font color="#888888"><br></font></blockquote></div><div>Would it be OK this way? <br><div class="im"><br> aout_instance_t *p_aout = input_GetAout( p_input );<br></div> if ( !p_aout )<br> {<br> vlc_object_release( p_input );<br>
return 0;<div class="im"><br> }<br> char *psz_af = var_GetNonEmptyString( p_aout, "audio-filter" );<br></div> if ( strstr ( psz_af, "equalizer" ) == NULL )<br> {<div class="im">
<br> vlc_object_release( p_aout );<br></div>
vlc_object_release( p_input );<br> return 0;<br> }<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex"><font color="#888888">
--<br>
fenrir<br>
</font><div class="im"><div><div></div><div><br>
_______________________________________________<br>
vlc-devel mailing list<br>
To unsubscribe or modify your subscription options:<br>
<a href="http://mailman.videolan.org/listinfo/vlc-devel" target="_blank">http://mailman.videolan.org/listinfo/vlc-devel</a><br>
</div></div></div></blockquote></div><br>
</blockquote></div><br>