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
afbbe5e3
Commit
afbbe5e3
authored
Aug 21, 2006
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set correct first gop closed value
Originally committed as revision 6043 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
2b7e230b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
gxfenc.c
libavformat/gxfenc.c
+4
-3
No files found.
libavformat/gxfenc.c
View file @
afbbe5e3
...
...
@@ -181,7 +181,7 @@ static int gxf_write_mpeg_auxiliary(ByteIOContext *pb, GXFStreamContext *ctx)
size
=
snprintf
(
buffer
,
1024
,
"Ver 1
\n
Br %.6f
\n
Ipg 1
\n
Ppi %d
\n
Bpiop %d
\n
"
"Pix 0
\n
Cf %d
\n
Cg %d
\n
Sl 7
\n
nl16 %d
\n
Vi 1
\n
f1 1
\n
"
,
(
float
)
ctx
->
codec
->
bit_rate
,
ctx
->
p_per_gop
,
ctx
->
b_per_gop
,
ctx
->
codec
->
pix_fmt
==
PIX_FMT_YUV422P
?
2
:
1
,
ctx
->
first_gop_closed
,
ctx
->
codec
->
pix_fmt
==
PIX_FMT_YUV422P
?
2
:
1
,
ctx
->
first_gop_closed
==
1
,
ctx
->
codec
->
height
/
16
);
put_byte
(
pb
,
0x4F
);
put_byte
(
pb
,
size
+
1
);
...
...
@@ -418,7 +418,7 @@ static int gxf_write_umf_media_mpeg(ByteIOContext *pb, GXFStreamContext *stream)
put_le32
(
pb
,
2
);
else
put_le32
(
pb
,
1
);
/* default to 420 */
put_le32
(
pb
,
stream
->
first_gop_closed
);
/* closed = 1, open = 0, unknown = 255 */
put_le32
(
pb
,
stream
->
first_gop_closed
==
1
);
/* closed = 1, open = 0, unknown = 255 */
put_le32
(
pb
,
3
);
/* top = 1, bottom = 2, frame = 3, unknown = 0 */
put_le32
(
pb
,
1
);
/* I picture per GOP */
put_le32
(
pb
,
stream
->
p_per_gop
);
...
...
@@ -625,6 +625,7 @@ static int gxf_write_header(AVFormatContext *s)
sc
->
fields
=
2
;
/* interlaced */
switch
(
sc
->
codec
->
codec_id
)
{
case
CODEC_ID_MPEG2VIDEO
:
sc
->
first_gop_closed
=
-
1
;
sc
->
track_type
=
4
;
gxf
->
mpeg_tracks
++
;
gxf
->
flags
|=
0x00008000
;
...
...
@@ -692,7 +693,7 @@ static int gxf_parse_mpeg_frame(GXFStreamContext *sc, const uint8_t *buf, int si
int
i
;
for
(
i
=
0
;
i
<
size
-
4
&&
c
!=
0x100
;
i
++
){
c
=
(
c
<<
8
)
+
buf
[
i
];
if
(
c
==
0x1B8
)
/* GOP start code */
if
(
c
==
0x1B8
&&
sc
->
first_gop_closed
==
-
1
)
/* GOP start code */
sc
->
first_gop_closed
=
(
buf
[
i
+
4
]
>>
6
)
&
1
;
}
return
(
buf
[
i
+
1
]
>>
3
)
&
7
;
...
...
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