<!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 Steve,</p>
<p>On 2017-04-03 09:58, Steve Lhomme wrote:</p>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> On Mon, Apr 3, 2017 at 9:52 AM, Filip Roséen <filip@atch.se> wrote:</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> vlc_rational_t aspect;
- if (!var_InheritURational(demux, &aspect.num, &aspect.den,
"decklink-aspect-ratio") &&
+ if (!var_InheritURational(demux, &aspect, "decklink-aspect-ratio") &&
aspect_num > 0 && aspect_den > 0) {
The above leaves usage of aspect_num and aspect_den, even though these are
no longer written to by var_InheritURational - which cannot be correct.
??? These variables went away in the previous patch.
Then how come they are still present in the above diff? I am not sure if
those “???” are directed to me or something else, though.</code></pre>
</blockquote>
<pre><code> This is patch 7. In patch 6 you have the following:</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> - unsigned aspect_num, aspect_den;
- if (!var_InheritURational(demux, &aspect_num, &aspect_den, "decklink-aspect-ratio") &&
+ vlc_rational_t aspect;
+ if (!var_InheritURational(demux, &aspect.num, &aspect.den, "decklink-aspect-ratio") &&
aspect_num > 0 && aspect_den > 0) {
- video_fmt.video.i_sar_num = aspect_num * video_fmt.video.i_height;
- video_fmt.video.i_sar_den = aspect_den * video_fmt.video.i_width;
+ video_fmt.video.i_sar_num = aspect.num * video_fmt.video.i_height;
+ video_fmt.video.i_sar_den = aspect.den * video_fmt.video.i_width;
}</code></pre>
</blockquote>
<pre><code> So I have no idea what you mean by "Then how come they are still
present in the above diff"</code></pre>
</blockquote>
<p>I am referring to the below, where <code>aspect_num</code> and <code>aspect_den</code> is still being used in the <em>if-condition</em>:</p>
<pre><code>+ if (!var_InheritURational(demux, &aspect.num, &aspect.den, "decklink-aspect-ratio") &&
aspect_num > 0 && aspect_den > 0) {</code></pre>
<blockquote style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;color:#500050">
<pre><code> You may confuse aspect_num and aspect.num.</code></pre>
</blockquote>
<p>I might be tired, but I can still distinguish an underscore from a dot! <code>;-)</code></p>
<p>Best Regards,<br />
Filip</p>
</body>
</html>