if (_ffmpeg_content->audio_stream() && _decode_audio) {
decode_audio_packet ();
+ AudioDecoder::flush ();
}
-
- AudioDecoder::flush ();
}
bool
FFmpegDecoder::seek (ContentTime time, bool accurate)
{
Decoder::seek (time, accurate);
- AudioDecoder::seek (time, accurate);
+ if (_decode_audio) {
+ AudioDecoder::seek (time, accurate);
+ }
/* If we are doing an accurate seek, our initial shot will be 200ms (200 being
a number plucked from the air) earlier than we want to end up. The loop below
using std::stringstream;
using std::string;
+using std::cout;
using boost::shared_ptr;
+using boost::lexical_cast;
SubRipContent::SubRipContent (shared_ptr<const Film> film, boost::filesystem::path path)
: Content (film, path)
SubRipContent::SubRipContent (shared_ptr<const Film> film, shared_ptr<const cxml::Node> node, int version)
: Content (film, node)
, SubtitleContent (film, node, version)
+ , _length (node->number_child<DCPTime> ("Length"))
{
}
}
void
-SubRipContent::as_xml (xmlpp::Node* node)
+SubRipContent::as_xml (xmlpp::Node* node) const
{
+ LocaleGuard lg;
+
node->add_child("Type")->add_child_text ("SubRip");
Content::as_xml (node);
SubtitleContent::as_xml (node);
+ node->add_child("Length")->add_child_text (lexical_cast<string> (_length));
}
DCPTime
std::string summary () const;
std::string technical_summary () const;
std::string information () const;
- void as_xml (xmlpp::Node *);
+ void as_xml (xmlpp::Node *) const;
DCPTime full_length () const;
std::string identifier () const;
using std::string;
using std::vector;
+using std::cout;
using boost::shared_ptr;
using boost::lexical_cast;
using boost::dynamic_pointer_cast;