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
590403c7
Commit
590403c7
authored
Jul 17, 2003
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed warnings
Originally committed as revision 2059 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
019ac05a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
47 deletions
+50
-47
mpeg.c
libavformat/mpeg.c
+0
-1
yuv4mpeg.c
libavformat/yuv4mpeg.c
+50
-46
No files found.
libavformat/mpeg.c
View file @
590403c7
...
...
@@ -406,7 +406,6 @@ static int mpeg_mux_end(AVFormatContext *ctx)
static
int
mpegps_probe
(
AVProbeData
*
p
)
{
int
code
,
c
,
i
;
const
uint8_t
*
d
;
code
=
0xff
;
/* we search the first start code. If it is a packet start code,
...
...
libavformat/yuv4mpeg.c
View file @
590403c7
...
...
@@ -26,7 +26,7 @@ static int yuv4_write_header(AVFormatContext *s)
{
AVStream
*
st
;
int
width
,
height
;
int
raten
,
rated
,
aspectn
,
aspectd
,
fps
,
fps1
,
n
,
gcd
;
int
raten
,
rated
,
aspectn
,
aspectd
,
n
;
char
buf
[
Y4M_LINE_MAX
+
1
];
if
(
s
->
nb_streams
!=
1
)
...
...
@@ -40,51 +40,55 @@ static int yuv4_write_header(AVFormatContext *s)
//this is identical to the code below for exact fps
av_reduce
(
&
raten
,
&
rated
,
st
->
codec
.
frame_rate
,
st
->
codec
.
frame_rate_base
,
(
1UL
<<
31
)
-
1
);
#else
fps
=
st
->
codec
.
frame_rate
;
fps1
=
(((
float
)
fps
/
st
->
codec
.
frame_rate_base
)
*
1000
);
/* Sorry about this messy code, but mpeg2enc is very picky about
* the framerates it accepts. */
switch
(
fps1
)
{
case
23976
:
raten
=
24000
;
/* turn the framerate into a ratio */
rated
=
1001
;
break
;
case
29970
:
raten
=
30000
;
rated
=
1001
;
break
;
case
25000
:
raten
=
25
;
rated
=
1
;
break
;
case
30000
:
raten
=
30
;
rated
=
1
;
break
;
case
24000
:
raten
=
24
;
rated
=
1
;
break
;
case
50000
:
raten
=
50
;
rated
=
1
;
break
;
case
59940
:
raten
=
60000
;
rated
=
1001
;
break
;
case
60000
:
raten
=
60
;
rated
=
1
;
break
;
default:
raten
=
st
->
codec
.
frame_rate
;
/* this setting should work, but often doesn't */
rated
=
st
->
codec
.
frame_rate_base
;
gcd
=
av_gcd
(
raten
,
rated
);
raten
/=
gcd
;
rated
/=
gcd
;
break
;
{
int
gcd
,
fps
,
fps1
;
fps
=
st
->
codec
.
frame_rate
;
fps1
=
(((
float
)
fps
/
st
->
codec
.
frame_rate_base
)
*
1000
);
/* Sorry about this messy code, but mpeg2enc is very picky about
* the framerates it accepts. */
switch
(
fps1
)
{
case
23976
:
raten
=
24000
;
/* turn the framerate into a ratio */
rated
=
1001
;
break
;
case
29970
:
raten
=
30000
;
rated
=
1001
;
break
;
case
25000
:
raten
=
25
;
rated
=
1
;
break
;
case
30000
:
raten
=
30
;
rated
=
1
;
break
;
case
24000
:
raten
=
24
;
rated
=
1
;
break
;
case
50000
:
raten
=
50
;
rated
=
1
;
break
;
case
59940
:
raten
=
60000
;
rated
=
1001
;
break
;
case
60000
:
raten
=
60
;
rated
=
1
;
break
;
default:
raten
=
st
->
codec
.
frame_rate
;
/* this setting should work, but often doesn't */
rated
=
st
->
codec
.
frame_rate_base
;
gcd
=
av_gcd
(
raten
,
rated
);
raten
/=
gcd
;
rated
/=
gcd
;
break
;
}
}
#endif
...
...
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