- /* Decode the content to get an accurate length */
-
- /* We don't want to use any existing length here, as progress
- will be messed up.
- */
- _film->unset_length ();
-
- shared_ptr<Options> o (new Options ("", "", ""));
- o->out_size = Size (512, 512);
- o->apply_crop = false;
- o->decode_audio = false;
-
- descend (1);
-
- pair<shared_ptr<VideoDecoder>, shared_ptr<AudioDecoder> > decoders = decoder_factory (_film, o, this);
-
- set_progress_unknown ();
- while (!decoders.first->pass()) {
- /* keep going */
- }
-
- _film->set_length (decoders.first->video_frame());
-
- _film->log()->log (String::compose ("Video length is %1 frames", _film->length()));
-
- ascend ();