[Ffmpeg-cvslog] CVS: ffmpeg/libavformat ogg2.c,1.10,1.11
Måns Rullgård CVS
mru
Mon Dec 5 01:15:55 CET 2005
Update of /cvsroot/ffmpeg/ffmpeg/libavformat
In directory mail:/var2/tmp/cvs-serv29717/libavformat
Modified Files:
ogg2.c
Log Message:
ogg format probe function by Ivo <ivop at euronet nl>
Index: ogg2.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavformat/ogg2.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- ogg2.c 23 Sep 2005 00:25:41 -0000 1.10
+++ ogg2.c 5 Dec 2005 00:15:51 -0000 1.11
@@ -622,11 +622,23 @@
}
#endif
+static int ogg_probe(AVProbeData *p)
+{
+ if (p->buf_size < 6)
+ return 0;
+ if (p->buf[0] == 'O' && p->buf[1] == 'g' &&
+ p->buf[2] == 'g' && p->buf[3] == 'S' &&
+ p->buf[4] == 0x0 && p->buf[5] <= 0x7 )
+ return AVPROBE_SCORE_MAX;
+ else
+ return 0;
+}
+
static AVInputFormat ogg_iformat = {
"ogg",
"Ogg",
sizeof (ogg_t),
- NULL,
+ ogg_probe,
ogg_read_header,
ogg_read_packet,
ogg_read_close,
More information about the ffmpeg-cvslog
mailing list