[FFmpeg-devel] [PATCH] oggparsevorbis: Hack to fix handling files that have a very short stream before the actual stream
Michael Niedermayer
michaelni at gmx.at
Mon Jan 7 05:48:06 CET 2013
Fixes Ticket2117
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavformat/oggparsevorbis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c
index 7e8f6ce..40919dc 100644
--- a/libavformat/oggparsevorbis.c
+++ b/libavformat/oggparsevorbis.c
@@ -203,7 +203,7 @@ vorbis_header (AVFormatContext * s, int idx)
int pkt_type = os->buf[os->pstart];
if (!(pkt_type & 1))
- return os->private ? 0 : -1;
+ return os->private && (os->psize>1 || !(os->flags & OGG_FLAG_EOS)) ? 0 : -1;
if (!os->private) {
os->private = av_mallocz(sizeof(struct oggvorbis_private));
--
1.7.9.5
More information about the ffmpeg-devel
mailing list