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
0b2bb354
Commit
0b2bb354
authored
Feb 11, 2006
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg-ps probe 2nd try
Originally committed as revision 4974 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5c4b1b25
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
mpeg.c
libavformat/mpeg.c
+5
-1
No files found.
libavformat/mpeg.c
View file @
0b2bb354
...
@@ -1263,7 +1263,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
...
@@ -1263,7 +1263,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
static
int
mpegps_probe
(
AVProbeData
*
p
)
static
int
mpegps_probe
(
AVProbeData
*
p
)
{
{
uint32_t
code
=
-
1
;
uint32_t
code
=
-
1
;
int
sys
=
0
,
pspack
=
0
;
int
sys
=
0
,
pspack
=
0
,
priv1
=
0
,
vid
=
0
;
int
i
;
int
i
;
for
(
i
=
0
;
i
<
p
->
buf_size
;
i
++
){
for
(
i
=
0
;
i
<
p
->
buf_size
;
i
++
){
...
@@ -1271,12 +1271,16 @@ static int mpegps_probe(AVProbeData *p)
...
@@ -1271,12 +1271,16 @@ static int mpegps_probe(AVProbeData *p)
if
((
code
&
0xffffff00
)
==
0x100
)
{
if
((
code
&
0xffffff00
)
==
0x100
)
{
switch
(
code
){
switch
(
code
){
case
SYSTEM_HEADER_START_CODE
:
sys
++
;
break
;
case
SYSTEM_HEADER_START_CODE
:
sys
++
;
break
;
case
PRIVATE_STREAM_1
:
priv1
++
;
break
;
case
PACK_START_CODE
:
pspack
++
;
break
;
case
PACK_START_CODE
:
pspack
++
;
break
;
case
(
VIDEO_ID
+
0x100
):
vid
++
;
break
;
}
}
}
}
}
}
if
(
sys
&&
sys
*
9
<=
pspack
*
10
)
if
(
sys
&&
sys
*
9
<=
pspack
*
10
)
return
AVPROBE_SCORE_MAX
/
2
+
2
;
// +1 for .mpg
return
AVPROBE_SCORE_MAX
/
2
+
2
;
// +1 for .mpg
if
((
priv1
||
vid
)
&&
(
priv1
+
vid
)
*
9
<=
pspack
*
10
)
return
AVPROBE_SCORE_MAX
/
2
+
2
;
// +1 for .mpg
return
0
;
return
0
;
}
}
...
...
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