fix crash if osd is not available when swith osd type
filterContextType, filter opacity. FilterContext in AVThread can be null

TODO:
  do not check FilterContext in public api
reset statistics if load media failed
add start_time and duration from AVFormatContext
always compute total time in OSD

FIXME:
compute once if media not changed