mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 19:31:12 +00:00
gst/typefind/gsttypefindfunctions.c: Add typefinder for MXF.
Original commit message from CVS: * gst/typefind/gsttypefindfunctions.c: (mxf_type_find), (plugin_init): Add typefinder for MXF.
This commit is contained in:
parent
d3edbe7745
commit
44143f1dcc
1 changed files with 16 additions and 0 deletions
|
@ -524,6 +524,7 @@ static void
|
|||
flac_type_find (GstTypeFind * tf, gpointer unused)
|
||||
{
|
||||
guint8 *data;
|
||||
DataScanCtx c = { 0, NULL, 0 };
|
||||
|
||||
data = gst_type_find_peek (tf, 0, 5);
|
||||
if (G_LIKELY (data)) {
|
||||
|
@ -536,6 +537,21 @@ flac_type_find (GstTypeFind * tf, gpointer unused)
|
|||
gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, FLAC_CAPS);
|
||||
}
|
||||
}
|
||||
|
||||
/* flac without headers */
|
||||
/* 64K should be enough */
|
||||
while (c.offset < (64 * 1024)) {
|
||||
if (G_UNLIKELY (!data_scan_ctx_ensure_data (tf, &c, 2)))
|
||||
break;
|
||||
|
||||
if (data[0] == 0xff && (data[1] >> 2) == 0x3e) {
|
||||
gst_type_find_suggest (tf, GST_TYPE_FIND_LIKELY, FLAC_CAPS);
|
||||
/* TODO: maybe check more parts of the frame header
|
||||
* to lower the risk of false positives */
|
||||
return;
|
||||
}
|
||||
data_scan_ctx_advance (tf, &c, 1);
|
||||
}
|
||||
}
|
||||
|
||||
/*** audio/mpeg version 2, 4 ***/
|
||||
|
|
Loading…
Reference in a new issue