While this may not answer your question, but it will be helpful to solve it. It seems like the statement
$video = get_post_meta($postid, 'dt_video', true);
is assigning blank string value to $video variable and thus iframe code becomes
<iframe width="180" height="101" src="https://wordpress.stackexchange.com/questions/139255/?rel=0" frameborder="0" allowfullscreen></iframe>
which is the cause of your site being displayed in the iframe.
And for your question:
I want to show the latest video posted which is decided by the latest post with the video url custom field filled in
I would suggest you to paste your code for selecting posts from db throug query, so I can have insight.
Edit:
change your query args parameter to exclude blank values in dt_video in post meta field.
$args = array(
'numberposts' => '1',
'tax_query' => array(
array(
'taxonomy' => 'post_format',
'field' => 'slug',
'terms' => 'post-format-video'
)
),
'meta_query' => array(
array(
'key' => 'dt_video',
'value' => '',
'compare' => '!='
)
)
);
check WordPress documentation for more information :http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters