diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-03-05 17:07:28 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2014-03-06 09:34:09 +0100 |
commit | d87ac93bcad353a68fd4fcf9e4878b22130e02a8 (patch) | |
tree | ad441ba00861725d2d19d2a5c375b44069852da3 | |
parent | 96603d5753c765c662a348b91a8e6d30226de700 (diff) | |
download | ffmpeg-d87ac93bcad353a68fd4fcf9e4878b22130e02a8.tar.gz |
avformat/oggparsevorbis: dont use invalid granules
Fixes Ticket3437
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 12b97dd375736c332989c50ea68af9d834b2621f)
-rw-r--r-- | libavformat/oggparsevorbis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index 36ad7384ea..14c7ddd04f 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -351,7 +351,7 @@ static int vorbis_packet(AVFormatContext *s, int idx) * here we parse the duration of each packet in the first page and compare * the total duration to the page granule to find the encoder delay and * set the first timestamp */ - if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) && !(os->flags & OGG_FLAG_EOS)) { + if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) && !(os->flags & OGG_FLAG_EOS) && (int64_t)os->granule>=0) { int seg, d; uint8_t *last_pkt = os->buf + os->pstart; uint8_t *next_pkt = last_pkt; |