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:38:07 -0300 |
commit | be23cee317f52f3dffa49812f412c0041d8b0de3 (patch) | |
tree | b365a274b81605ebdf45f3f98c36cafd454ba648 /libavformat | |
parent | 2d66486b8eab6f89311bd0832c5f326a5d80e276 (diff) | |
download | ffmpeg-be23cee317f52f3dffa49812f412c0041d8b0de3.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)
Diffstat (limited to 'libavformat')
-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 415a4235dc..79c018da66 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; |