for (int i = 0; i < filterGraph.getNumTracks(); ++i)
{
if (filterGraph.isTrackEnabled(i))
{
final FilterGraph filterGraphCopy = filterGraph.duplicate();
trackThreads[i] = new TrackThread(filterGraphCopy, i, videoTrackIndex == i ? FilterGraph.SUPPRESS_TRACK_READ : FilterGraph.PROCESS_DEFAULT); // use a copy of the graph for each thread, so that they don't interfere with each other.
// mgodehardt: may block the blocking realize forever, if input stream is closed before data is read
/*if (videoTrackIndex == i) // if it has a video track - read the first video frame
{ final int result = filterGraphCopy.process(null, videoTrackIndex, -1, FilterGraph.PROCESS_DEFAULT); // doesn't work because we have to use the actual filter graph clone that is used for the track.