Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
9ca5b272
Commit
9ca5b272
authored
Feb 01, 2016
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/adxdec: Add Autodetection.
parent
09b3a424
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
adxdec.c
libavformat/adxdec.c
+14
-0
No files found.
libavformat/adxdec.c
View file @
9ca5b272
...
...
@@ -34,6 +34,19 @@ typedef struct ADXDemuxerContext {
int
header_size
;
}
ADXDemuxerContext
;
static
int
adx_probe
(
AVProbeData
*
p
)
{
int
offset
;
if
(
AV_RB16
(
p
->
buf
)
!=
0x8000
)
return
0
;
offset
=
AV_RB16
(
&
p
->
buf
[
2
]);
if
(
offset
<
8
||
offset
>
p
->
buf_size
-
4
||
memcmp
(
p
->
buf
+
offset
-
2
,
"(c)CRI"
,
6
))
return
0
;
return
AVPROBE_SCORE_MAX
*
3
/
4
;
}
static
int
adx_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
ADXDemuxerContext
*
c
=
s
->
priv_data
;
...
...
@@ -107,6 +120,7 @@ static int adx_read_header(AVFormatContext *s)
AVInputFormat
ff_adx_demuxer
=
{
.
name
=
"adx"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"CRI ADX"
),
.
read_probe
=
adx_probe
,
.
priv_data_size
=
sizeof
(
ADXDemuxerContext
),
.
read_header
=
adx_read_header
,
.
read_packet
=
adx_read_packet
,
...
...
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