summaryrefslogtreecommitdiff
path: root/src/lib/decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-10-09 02:14:04 +0100
committerCarl Hetherington <cth@carlh.net>2012-10-09 02:14:04 +0100
commite73d64612c12f2027a91fa2061992aeec3c4bb60 (patch)
treeb45a2f520ac12318964f90bcaa78b469b2f4411a /src/lib/decoder.cc
parenta78f48e77516d64f568cd6ea7c35b7095264b78c (diff)
Remove some unnecessary code.
Diffstat (limited to 'src/lib/decoder.cc')
-rw-r--r--src/lib/decoder.cc17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/lib/decoder.cc b/src/lib/decoder.cc
index 8aa5f77c6..324d1a296 100644
--- a/src/lib/decoder.cc
+++ b/src/lib/decoder.cc
@@ -112,7 +112,7 @@ Decoder::process_end ()
*/
int64_t const audio_short_by_frames =
- ((int64_t) decoding_frames() * _fs->target_sample_rate() / _fs->frames_per_second)
+ ((int64_t) _fs->dcp_length() * _fs->target_sample_rate() / _fs->frames_per_second)
- _audio_frames_processed;
if (audio_short_by_frames >= 0) {
@@ -147,24 +147,13 @@ Decoder::go ()
while (pass () == false) {
if (_job && !_ignore_length) {
- _job->set_progress (float (_video_frame) / decoding_frames ());
+ _job->set_progress (float (_video_frame) / _fs->dcp_length());
}
}
process_end ();
}
-/** @return Number of frames that we will be decoding */
-int
-Decoder::decoding_frames () const
-{
- if (_opt->num_frames > 0) {
- return _opt->num_frames;
- }
-
- return _fs->length;
-}
-
/** Run one pass. This may or may not generate any actual video / audio data;
* some decoders may require several passes to generate a single frame.
* @return true if we have finished processing all data; otherwise false.
@@ -177,7 +166,7 @@ Decoder::pass ()
_have_setup_video_filters = true;
}
- if (_opt->num_frames != 0 && _video_frame >= _opt->num_frames) {
+ if (_video_frame >= _fs->dcp_length()) {
return true;
}