title: Inconsistant rendering in mlt XML and C interface and 'hold' producer and avformat consumer
body: <p>I am trying to create a short video that is just a single image. (I know its a bit silly, but its a test for something bigger).</p>
  
  <p>The code I have for rendering it is:</p>
  
  <pre><code>#include &lt;framework/mlt.h&gt;
  #include &lt;stdlib.h&gt;
  #include &lt;unistd.h&gt;
  
  int main() {
    if(mlt_factory_init(NULL)) {
      mlt_profile p = mlt_profile_init(NULL);
      mlt_consumer target = mlt_factory_consumer(p, "avformat", 
      mlt_producer source = mlt_factory_producer(p, "hold", "/Users/leif/logo.png");
      mlt_producer_set_in_and_out(source, 0, 10);
      mlt_consumer_connect(target, mlt_producer_service(source));
      mlt_consumer_start(target);
  
      sleep(5);
      mlt_consumer_stop(target);
  
      mlt_consumer_close(target);
      mlt_producer_close(source);
      mlt_factory_close();
    } else {
      printf("No\n");
    }
  
    return 0;
  }
  </code></pre>
  
  <p>Where <code>logo.png</code> is <a href="https://avatars0.githubusercontent.com/u/232371?v=3&amp;s=400" rel="nofollow">this file</a>.</p>
  
  <p>When I run this code and play <code>output.mp4</code>, the picture comes out all garbelled. There is a green line in the middle and the logo is superimposed on itself a lot.</p>
  
  <p>On the other hand, if I change the consumer to be SDL, the image plays just fine.</p>
  
  <p>And finally, if I change the consumer to be XML, and then use the melt command line application to render it:</p>
  
  <pre><code>melt -consumer avformat:xmlout.mp4 output.xml
  </code></pre>
  
  <p>and play the video, it also plays fine.</p>
  
  <p>Is there something I am missing in the avformat consumer that I should be setting? Or something else that I am missing here?</p>
  
  <p>Edit: For reference, the outputted xml file: <code>output.xml</code> is:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;mlt LC_NUMERIC="en_US.UTF-8" version="6.2.0" root="/Users/leif/src/video/private" title="Anonymous Submission" parent="producer0" in="0" out="10"&gt;
        &lt;profile description="DV/DVD PAL" width="720" height="576" progressive="0" sample_aspect_num="16" sample_aspect_den="15" display_aspect_num="4" display_aspect_den="3" frame_rate_num="25" frame_rate_den="1" colorspace="601"/&gt;
    &lt;producer id="producer0" title="Anonymous Submission" in="0" out="10"&gt;
      &lt;property name="length"&gt;15000&lt;/property&gt;
      &lt;property name="eof"&gt;pause&lt;/property&gt;
      &lt;property name="resource"&gt;/Users/leif/logo.png&lt;/property&gt;
      &lt;property name="aspect_ratio"&gt;1.06667&lt;/property&gt;
      &lt;property name="frame"&gt;0&lt;/property&gt;
      &lt;property name="method"&gt;onefield&lt;/property&gt;
      &lt;property name="mlt_service"&gt;hold&lt;/property&gt;
      &lt;property name="global_feed"&gt;1&lt;/property&gt;
    &lt;/producer&gt;
  &lt;/mlt&gt;
  </code></pre>