aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/oggparseskeleton.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-06 23:53:19 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-06 23:53:19 +0200
commit9a6e814be7c052deb34a8f585176d053f4c187c1 (patch)
tree83b0283a9bd6c28cbf063619bf8d5410f9e05e74 /libavformat/oggparseskeleton.c
parent7f250502897e7af7d9912519c3251f89866feb04 (diff)
downloadffmpeg-9a6e814be7c052deb34a8f585176d053f4c187c1.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>
Diffstat (limited to 'libavformat/oggparseskeleton.c')
-rw-r--r--libavformat/oggparseskeleton.c3
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;