<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="pandoc" />
<title></title>
<style type="text/css">code{white-space: pre;}</style>
</head>
<body>
<p>Hi Rémi,</p>
<p>On 2017-02-25 09:48, Rémi Denis-Courmont wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> ---
src/input/stream_extractor.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/input/stream_extractor.c b/src/input/stream_extractor.c
index 68d76f13c3..00cf5ee624 100644
--- a/src/input/stream_extractor.c
+++ b/src/input/stream_extractor.c
@@ -281,8 +281,9 @@ static int
StreamExtractorAttach( stream_t** source, char const* identifier,
char const* module_name )
{
- char const* capability = identifier ? "stream_extractor"
- : "stream_directory";
+ const bool extractor = identifier != NULL;
+ char const* capability = extractor ? "stream_extractor"
+ : "stream_directory";
struct stream_extractor_private* priv = vlc_custom_create(
(*source)->obj.parent, sizeof( *priv ), capability );
@@ -290,7 +291,7 @@ StreamExtractorAttach( stream_t** source, char const* identifier,
if( unlikely( !priv ) )
return VLC_ENOMEM;
- if( strcmp( capability, "stream_extractor" ) == 0 )
+ if( extractor )
{
priv->object = VLC_OBJECT( &priv->extractor );
</code></pre>
</blockquote>
<p>I have no strong opinion about this, I obviously decided not to write it like that but with that in mind; LGTM.</p>
</body>
</html>