[FFmpeg-cvslog] oggparseskeleton: avoid header parsing failure

Michael Niedermayer git at videolan.org
Sun Jul 7 00:00:38 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Jul  6 23:53:19 2013 +0200| [9a6e814be7c052deb34a8f585176d053f4c187c1] | committer: Michael Niedermayer

oggparseskeleton: avoid header parsing failure

Based on description by James Almer and the xiph wiki

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=9a6e814be7c052deb34a8f585176d053f4c187c1
---

 libavformat/oggparseskeleton.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c
index b012105..d94b0c2 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;
 



More information about the ffmpeg-cvslog mailing list