summaryrefslogtreecommitdiff
path: root/src/lib/ffmpeg_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-03-05 23:10:16 +0000
committerCarl Hetherington <cth@carlh.net>2013-03-05 23:10:16 +0000
commit18614dda0d53b713ace5ad1df57298d049dba87f (patch)
treee68887db77ec57a2de344f8230b0e801030bdca5 /src/lib/ffmpeg_decoder.cc
parent8fa7b8c13a76bd54207156de7bb0d09316bad379 (diff)
Split timed from untimed sinks / sources. Should produce same output, in theory.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
-rw-r--r--src/lib/ffmpeg_decoder.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index ac25844e3..32c8e224a 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -640,7 +640,8 @@ FFmpegDecoder::out_with_sync ()
if (delta > one_frame) {
int const extra = rint (delta / one_frame);
for (int i = 0; i < extra; ++i) {
- repeat_last_video ();
+ /* XXX: timestamp is wrong */
+ repeat_last_video (source_pts_seconds);
_film->log()->log (
String::compose (
N_("Extra video frame inserted at %1s; source frame %2, source PTS %3 (at %4 fps)"),
@@ -739,7 +740,8 @@ FFmpegDecoder::decode_audio_packet ()
if (s) {
shared_ptr<AudioBuffers> audio (new AudioBuffers (ffa->channels(), s));
audio->make_silent ();
- Audio (audio);
+ /* XXX: this time stamp is wrong */
+ Audio (audio, source_pts_seconds);
}
}
@@ -748,7 +750,7 @@ FFmpegDecoder::decode_audio_packet ()
);
assert (_audio_codec_context->channels == _film->audio_channels());
- Audio (deinterleave_audio (_frame->data, data_size));
+ Audio (deinterleave_audio (_frame->data, data_size), source_pts_seconds );
}
}