diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-09-19 23:32:13 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-09-19 23:32:13 +0100 |
| commit | 466524e5991cb51dd9c961eac4cb9c0d051938d4 (patch) | |
| tree | c1bad08cd59461046977b1cad5c5c41d7b040530 /src/lib/ffmpeg_decoder.cc | |
| parent | b65ce7631f7beea66bc4639e3de9e4aa8201a44d (diff) | |
Discard packets with crazy (very negative) timestamps.
Diffstat (limited to 'src/lib/ffmpeg_decoder.cc')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 3 |
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); } } |
