title: Inconsistent Program using Directshow - MPEG-TS Re-streamer
body: <p>I've being trying to develop an application for a couple of months now, it's a MPEG-TS Demux/Mux re-streamer. So, it consists of a program that basically has a capture filter for MPEG-TS, this MPEG-TS is demuxed and the video passes through a Infinite Tee filter, one output of this tee goes back to another MPEG-TS Multiplexer, to enable its re-stream, and the other output goes to a VMR9 for monitoring reasons. The audio streams from this input MPEG-TS goes to a Audio Mixer hardware. The Audio Mixer output goes back to the filter graph and is set as the second input on the MPEG-TS Multiplexer. Finally this MPEG-TS muxed is re-streamed. </p>
  
  <p>This program was made using GraphStudioNext as testing environment. And, then it was coded in C# + WPF using Visual Studio 2015. The main problem is that although this C# program runs well sometimes, some other times it doesn't. </p>
  
  <p>What I mean is: my program has a simple "Initialize" button. When the user clicks that button, the code basically creates this filter graph, consisting of the filters described above, and then it runs the graph. The program runs really well, the re-stream works, the VMR9 monitoring window works too, running straight for 8 hours of testing. But, some other times, when I click this "Initialize" button, the VMR9 is just broken, stuttering while playing, and the re-streamer outputs streams that appear to contain errors (because of the other MPEG-TS clients that receives this re-stream, and is able to monitor it). Then, I'm not really sure what the problem could be. Since, the program initializes and runs perfectly well sometimes, but some other times it just runs right from the beggining, totally broken. </p>
  
  <p>Would you have any ideas of how I could better debug this kind of inconsistency in my program? (right now I'm trying to find differences between the filter graphs created in runtime, making use of SaveGraphFile function, although I don't find much differences between the .grf files there)</p>
  
  <p>Thanks, Lucas.</p>