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
df099252
Commit
df099252
authored
May 15, 2009
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reindent
Originally committed as revision 18835 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
58a83023
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
24 deletions
+24
-24
mxfenc.c
libavformat/mxfenc.c
+24
-24
No files found.
libavformat/mxfenc.c
View file @
df099252
...
...
@@ -1316,33 +1316,33 @@ static int mxf_parse_mpeg2_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt
break
;
}
}
else
if
(
c
==
0x1b8
)
{
// gop
if
(
pkt
->
data
[
i
+
4
]
>>
6
&
0x01
)
// closed
*
flags
|=
0x80
;
// random access
if
(
!
mxf
->
header_written
)
{
unsigned
hours
=
(
pkt
->
data
[
i
+
1
]
>>
2
)
&
0x1f
;
unsigned
minutes
=
((
pkt
->
data
[
i
+
1
]
&
0x03
)
<<
4
)
|
(
pkt
->
data
[
i
+
2
]
>>
4
);
unsigned
seconds
=
((
pkt
->
data
[
i
+
2
]
&
0x07
)
<<
3
)
|
(
pkt
->
data
[
i
+
3
]
>>
5
);
unsigned
frames
=
((
pkt
->
data
[
i
+
3
]
&
0x1f
)
<<
1
)
|
(
pkt
->
data
[
i
+
4
]
>>
7
);
mxf
->
timecode_drop_frame
=
!!
(
pkt
->
data
[
i
+
1
]
&
0x80
);
mxf
->
timecode_start
=
(
hours
*
3600
+
minutes
*
60
+
seconds
)
*
mxf
->
timecode_base
+
frames
;
if
(
mxf
->
timecode_drop_frame
)
{
unsigned
tminutes
=
60
*
hours
+
minutes
;
mxf
->
timecode_start
-=
2
*
(
tminutes
-
tminutes
/
10
);
}
av_log
(
s
,
AV_LOG_DEBUG
,
"frame %d %d:%d:%d%c%d
\n
"
,
mxf
->
timecode_start
,
hours
,
minutes
,
seconds
,
mxf
->
timecode_drop_frame
?
';'
:
':'
,
frames
);
if
(
pkt
->
data
[
i
+
4
]
>>
6
&
0x01
)
// closed
*
flags
|=
0x80
;
// random access
if
(
!
mxf
->
header_written
)
{
unsigned
hours
=
(
pkt
->
data
[
i
+
1
]
>>
2
)
&
0x1f
;
unsigned
minutes
=
((
pkt
->
data
[
i
+
1
]
&
0x03
)
<<
4
)
|
(
pkt
->
data
[
i
+
2
]
>>
4
);
unsigned
seconds
=
((
pkt
->
data
[
i
+
2
]
&
0x07
)
<<
3
)
|
(
pkt
->
data
[
i
+
3
]
>>
5
);
unsigned
frames
=
((
pkt
->
data
[
i
+
3
]
&
0x1f
)
<<
1
)
|
(
pkt
->
data
[
i
+
4
]
>>
7
);
mxf
->
timecode_drop_frame
=
!!
(
pkt
->
data
[
i
+
1
]
&
0x80
);
mxf
->
timecode_start
=
(
hours
*
3600
+
minutes
*
60
+
seconds
)
*
mxf
->
timecode_base
+
frames
;
if
(
mxf
->
timecode_drop_frame
)
{
unsigned
tminutes
=
60
*
hours
+
minutes
;
mxf
->
timecode_start
-=
2
*
(
tminutes
-
tminutes
/
10
);
}
av_log
(
s
,
AV_LOG_DEBUG
,
"frame %d %d:%d:%d%c%d
\n
"
,
mxf
->
timecode_start
,
hours
,
minutes
,
seconds
,
mxf
->
timecode_drop_frame
?
';'
:
':'
,
frames
);
}
}
else
if
(
c
==
0x1b3
)
{
// seq
*
flags
|=
0x40
;
switch
((
pkt
->
data
[
i
+
4
]
>>
4
)
&
0xf
)
{
case
2
:
sc
->
aspect_ratio
=
(
AVRational
){
4
,
3
};
break
;
case
3
:
sc
->
aspect_ratio
=
(
AVRational
){
16
,
9
};
break
;
case
4
:
sc
->
aspect_ratio
=
(
AVRational
){
221
,
100
};
break
;
default:
av_reduce
(
&
sc
->
aspect_ratio
.
num
,
&
sc
->
aspect_ratio
.
den
,
st
->
codec
->
width
,
st
->
codec
->
height
,
1024
*
1024
);
}
switch
((
pkt
->
data
[
i
+
4
]
>>
4
)
&
0xf
)
{
case
2
:
sc
->
aspect_ratio
=
(
AVRational
){
4
,
3
};
break
;
case
3
:
sc
->
aspect_ratio
=
(
AVRational
){
16
,
9
};
break
;
case
4
:
sc
->
aspect_ratio
=
(
AVRational
){
221
,
100
};
break
;
default:
av_reduce
(
&
sc
->
aspect_ratio
.
num
,
&
sc
->
aspect_ratio
.
den
,
st
->
codec
->
width
,
st
->
codec
->
height
,
1024
*
1024
);
}
}
else
if
(
c
==
0x100
)
{
// pic
int
pict_type
=
(
pkt
->
data
[
i
+
2
]
>>
3
)
&
0x07
;
if
(
pict_type
==
2
)
{
// P frame
...
...
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