summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-09-20 09:45:02 +0100
committerCarl Hetherington <cth@carlh.net>2016-09-20 09:45:02 +0100
commitb0f4faaa75ff563cdc8133d396c1b45456bde4ce (patch)
treeecc44e59691fe7c9be340a8b5957c29b41575c1a
parente45d5bbe01e291038397d3b879f102a1ffe69615 (diff)
parent9518d2a417833b530d2ef00c33179b27bcfa41da (diff)
Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
-rw-r--r--src/lib/ffmpeg_decoder.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc
index ace54f719..a0965dcfb 100644
--- a/src/lib/ffmpeg_decoder.cc
+++ b/src/lib/ffmpeg_decoder.cc
@@ -421,7 +421,8 @@ FFmpegDecoder::decode_audio_packet ()
ct += ContentTime::from_frames (remove, (*stream)->frame_rate ());
}
- if (data->frames() > 0) {
+ /* Give this data provided there is some, and its time is sane */
+ if (ct >= ContentTime() && data->frames() > 0) {
audio->give (*stream, data, ct);
}
}