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:40:46 -0300 |
commit | 944c47166d618dc02b65fd644b7a34de516514c8 (patch) | |
tree | 9ac9ec320823a28e42f2e29ca02eaff74c24483a | |
parent | 86a816902f36f01b3ea83b08cfe681add0a43995 (diff) | |
download | ffmpeg-944c47166d618dc02b65fd644b7a34de516514c8.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 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; |