Fix typefinding for BBB's new system

Original commit message from CVS:
Fix typefinding for BBB's new system
This commit is contained in:
David Schleef 2003-10-03 17:01:25 +00:00
parent 01f9797a3b
commit 14d73ce3e7

View file

@ -20,6 +20,8 @@
#include <string.h>
#include <gst/gstbytestream.h>
#include "gstsiddec.h"
/* elementfactory information */
@ -33,7 +35,7 @@ static GstElementDetails gst_siddec_details = {
"(C) 2001",
};
static GstCaps* sid_typefind (GstBuffer *buf, gpointer priv);
static GstCaps* sid_typefind (GstByteStream *bs, gpointer priv);
/* typefactory for 'sid' */
static GstTypeDefinition siddefinition = {
@ -184,13 +186,17 @@ gst_siddec_get_type (void)
}
static GstCaps*
sid_typefind (GstBuffer *buf, gpointer priv)
sid_typefind (GstByteStream *bs, gpointer priv)
{
guchar *data = GST_BUFFER_DATA (buf);
guchar *data;
GstBuffer *buffer;
GstCaps *newcaps;
GST_DEBUG ("sid_demux: typefind");
gst_bytestream_peek (bs, &buffer, 4);
data = GST_BUFFER_DATA (buffer);
if (strncmp ((const char *)data, "PSID", 4))
return NULL;