Merge branch 'master' of ssh://git.carlh.net/home/carl/git/dcpomatic
authorCarl Hetherington <cth@carlh.net>
Mon, 19 Sep 2016 23:21:54 +0000 (00:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Mon, 19 Sep 2016 23:21:54 +0000 (00:21 +0100)
src/lib/ffmpeg_decoder.cc

index ace54f7194a3eaffd0cd13f984e80af97e0be12e..a0965dcfb81a917eef2e0ba46b1223d536f35cc6 100644 (file)
@@ -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);
                        }
                }