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
14b3f996
Commit
14b3f996
authored
Aug 10, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
header repetition
Originally committed as revision 10051 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ead1939f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
nut.h
libavformat/nut.h
+1
-0
nutenc.c
libavformat/nutenc.c
+9
-2
No files found.
libavformat/nut.h
View file @
14b3f996
...
...
@@ -88,6 +88,7 @@ typedef struct {
unsigned
int
max_distance
;
unsigned
int
time_base_count
;
int64_t
last_syncpoint_pos
;
int
header_count
;
AVRational
*
time_base
;
struct
AVTreeNode
*
syncpoints
;
}
NUTContext
;
...
...
libavformat/nutenc.c
View file @
14b3f996
...
...
@@ -365,6 +365,9 @@ static void write_headers(NUTContext *nut, ByteIOContext *bc){
url_open_dyn_buf
(
&
dyn_bc
);
write_globalinfo
(
nut
,
&
dyn_bc
);
put_packet
(
nut
,
bc
,
&
dyn_bc
,
1
,
INFO_STARTCODE
);
nut
->
last_syncpoint_pos
=
INT_MIN
;
nut
->
header_count
++
;
}
static
int
write_header
(
AVFormatContext
*
s
){
...
...
@@ -416,7 +419,7 @@ static int write_header(AVFormatContext *s){
put_flush_packet
(
bc
);
//FIXME
header repeation,
index
//FIXME index
return
0
;
}
...
...
@@ -445,6 +448,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){
int
key_frame
=
!!
(
pkt
->
flags
&
PKT_FLAG_KEY
);
int
store_sp
=
0
;
if
(
1LL
<<
(
20
+
3
*
nut
->
header_count
)
<=
url_ftell
(
bc
))
write_headers
(
nut
,
bc
);
if
(
key_frame
&&
!!
(
nus
->
last_flags
&
FLAG_KEY
))
store_sp
=
1
;
...
...
@@ -563,7 +569,8 @@ static int write_trailer(AVFormatContext *s){
NUTContext
*
nut
=
s
->
priv_data
;
ByteIOContext
*
bc
=
&
s
->
pb
;
write_headers
(
nut
,
bc
);
while
(
nut
->
header_count
<
3
)
write_headers
(
nut
,
bc
);
put_flush_packet
(
bc
);
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