[FFmpeg-cvslog] oggparseskeleton: avoid header parsing failure

Michael Niedermayer git at videolan.org
Mon Jul 15 02:29:22 CEST 2013


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Sat Jul  6 23:53:19 2013 +0200| [ba4cb43f0b94ad7a468d34c172a87c73c95243a7] | 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=ba4cb43f0b94ad7a468d34c172a87c73c95243a7
---

 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