From 466524e5991cb51dd9c961eac4cb9c0d051938d4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 19 Sep 2016 23:32:13 +0100 Subject: Discard packets with crazy (very negative) timestamps. --- src/lib/ffmpeg_decoder.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/lib/ffmpeg_decoder.cc') 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); } } -- cgit v1.2.3