+template <class T>
+shared_ptr<T>
+maybe_cast (shared_ptr<Decoder> d)
+{
+ if (!d) {
+ return shared_ptr<T> ();
+ }
+ return dynamic_pointer_cast<T> (d);
+}
+
+/**
+ @param tolerant true to proceed in the face of `survivable' errors, otherwise false.
+ @param old_decoder A `used' decoder that has been previously made for this piece of content, or 0
+*/