diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-10-22 11:21:31 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-10-22 11:21:31 +0100 |
| commit | 4cb33e432c7070f59c3ee3fbeb0b5c8755bba3bd (patch) | |
| tree | b574347f4921b9b8edc9b1a64e6ae80c62b599cf /src/lib/examine_content_job.cc | |
| parent | 1cc6986bdc5c35fd512257336f36bdb1b4142183 (diff) | |
Partial fix to sync according to pts.
Diffstat (limited to 'src/lib/examine_content_job.cc')
| -rw-r--r-- | src/lib/examine_content_job.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/examine_content_job.cc b/src/lib/examine_content_job.cc index cad560908..d91fc2136 100644 --- a/src/lib/examine_content_job.cc +++ b/src/lib/examine_content_job.cc @@ -28,6 +28,7 @@ #include "decoder.h" #include "imagemagick_encoder.h" #include "transcoder.h" +#include "log.h" using namespace std; using namespace boost; @@ -67,7 +68,12 @@ ExamineContentJob::run () _decoder = decoder_factory (fs, o, this, _log, true, true); _decoder->go (); - fs->set_length (last_video_frame ()); + + fs->set_length (_decoder->last_video_frame ()); + fs->set_audio_delay (-_decoder->audio_to_discard ()); + + _log->log (String::compose ("Video length is %1 frames", _decoder->last_video_frame())); + _log->log (String::compose ("%1ms of audio to discard", _decoder->audio_to_discard())); ascend (); |
