diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-06 23:53:19 +0200 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2013-07-07 21:42:01 -0300 |
commit | ba4cb43f0b94ad7a468d34c172a87c73c95243a7 (patch) | |
tree | bd73e3585d54cf7d9fd0ff1a24125e7023dde966 | |
parent | dc73774792265e24fc1aad1b9d36f7c6669b8d66 (diff) | |
download | ffmpeg-ba4cb43f0b94ad7a468d34c172a87c73c95243a7.tar.gz |
oggparseskeleton: avoid header parsing failure
Based on description by James Almer and the xiph wiki
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9a6e814be7c052deb34a8f585176d053f4c187c1)
-rw-r--r-- | libavformat/oggparseskeleton.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c index b0121059a0..d94b0c2e07 100644 --- a/libavformat/oggparseskeleton.c +++ b/libavformat/oggparseskeleton.c @@ -37,6 +37,9 @@ static int skeleton_header(AVFormatContext *s, int idx) strcpy(st->codec->codec_name, "skeleton"); st->codec->codec_type = AVMEDIA_TYPE_DATA; + if ((os->flags & OGG_FLAG_EOS) && os->psize == 0) + return 1; + if (os->psize < 8) return -1; |