Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gst-plugins-good
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nirbheek Chauhan
gst-plugins-good
Commits
826852ba
Commit
826852ba
authored
Sep 20, 2003
by
Jeremy Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix flac file detection (#121143)
Original commit message from CVS: fix flac file detection (#121143)
parent
ae231026
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
4 deletions
+22
-4
ext/flac/gstflac.c
ext/flac/gstflac.c
+22
-4
No files found.
ext/flac/gstflac.c
View file @
826852ba
...
@@ -70,12 +70,30 @@ static GstTypeDefinition flacdefinition = {
...
@@ -70,12 +70,30 @@ static GstTypeDefinition flacdefinition = {
static
GstCaps
*
static
GstCaps
*
flac_type_find
(
GstBuffer
*
buf
,
gpointer
private
)
flac_type_find
(
GstBuffer
*
buf
,
gpointer
private
)
{
{
gint
offset
;
guint8
*
data
;
gint
size
;
guint32
head
=
GUINT32_FROM_BE
(
*
((
guint32
*
)
GST_BUFFER_DATA
(
buf
)));
guint32
head
=
GUINT32_FROM_BE
(
*
((
guint32
*
)
GST_BUFFER_DATA
(
buf
)));
if
(
head
!=
0x664C6143
)
data
=
GST_BUFFER_DATA
(
buf
);
return
NULL
;
size
=
GST_BUFFER_SIZE
(
buf
);
return
gst_caps_new
(
"flac_type_find"
,
"application/x-flac"
,
NULL
);
if
(
head
==
0x664C6143
)
return
gst_caps_new
(
"flac_type_find"
,
"application/x-flac"
,
NULL
);
else
{
/* checks for existance of flac identification header in case
* there's an ID3 tag */
for
(
offset
=
0
;
offset
<
size
-
4
;
offset
++
)
{
if
(
data
[
offset
]
==
'f'
&&
data
[
offset
+
1
]
==
'L'
&&
data
[
offset
+
2
]
==
'a'
&&
data
[
offset
+
3
]
==
'C'
)
{
return
gst_caps_new
(
"flac_type_find"
,
"application/x-flac"
,
NULL
);
}
}
}
return
NULL
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment