[FFmpeg-cvslog] oggparseskeleton: avoid header parsing failure

Michael Niedermayer git at videolan.org
Sun Jul 21 03:43:33 CEST 2013


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Sat Jul  6 23:53:19 2013 +0200| [be23cee317f52f3dffa49812f412c0041d8b0de3] | committer: James Almer

oggparseskeleton: avoid header parsing failure

Based on description by James Almer and the xiph wiki

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 9a6e814be7c052deb34a8f585176d053f4c187c1)

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

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

diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c
index 415a423..79c018d 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