As per the spec, the duration of a media file is NaN when no media data is available The HTMLMediaElement needs to special case that state when it does comparisons with "duration()".
Created attachment 29004 [details] proposed patch
Sending WebCore/ChangeLog Sending WebCore/html/HTMLMediaElement.cpp Transmitting file data .. Committed revision 42029.