Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
14b3f996
Commit
14b3f996
authored
17 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
header repetition
Originally committed as revision 10051 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ead1939f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libavformat/nut.h
+1
-0
1 addition, 0 deletions
libavformat/nut.h
libavformat/nutenc.c
+9
-2
9 additions, 2 deletions
libavformat/nutenc.c
with
10 additions
and
2 deletions
libavformat/nut.h
+
1
−
0
View file @
14b3f996
...
@@ -88,6 +88,7 @@ typedef struct {
...
@@ -88,6 +88,7 @@ typedef struct {
unsigned
int
max_distance
;
unsigned
int
max_distance
;
unsigned
int
time_base_count
;
unsigned
int
time_base_count
;
int64_t
last_syncpoint_pos
;
int64_t
last_syncpoint_pos
;
int
header_count
;
AVRational
*
time_base
;
AVRational
*
time_base
;
struct
AVTreeNode
*
syncpoints
;
struct
AVTreeNode
*
syncpoints
;
}
NUTContext
;
}
NUTContext
;
...
...
This diff is collapsed.
Click to expand it.
libavformat/nutenc.c
+
9
−
2
View file @
14b3f996
...
@@ -365,6 +365,9 @@ static void write_headers(NUTContext *nut, ByteIOContext *bc){
...
@@ -365,6 +365,9 @@ static void write_headers(NUTContext *nut, ByteIOContext *bc){
url_open_dyn_buf
(
&
dyn_bc
);
url_open_dyn_buf
(
&
dyn_bc
);
write_globalinfo
(
nut
,
&
dyn_bc
);
write_globalinfo
(
nut
,
&
dyn_bc
);
put_packet
(
nut
,
bc
,
&
dyn_bc
,
1
,
INFO_STARTCODE
);
put_packet
(
nut
,
bc
,
&
dyn_bc
,
1
,
INFO_STARTCODE
);
nut
->
last_syncpoint_pos
=
INT_MIN
;
nut
->
header_count
++
;
}
}
static
int
write_header
(
AVFormatContext
*
s
){
static
int
write_header
(
AVFormatContext
*
s
){
...
@@ -416,7 +419,7 @@ static int write_header(AVFormatContext *s){
...
@@ -416,7 +419,7 @@ static int write_header(AVFormatContext *s){
put_flush_packet
(
bc
);
put_flush_packet
(
bc
);
//FIXME
header repeation,
index
//FIXME index
return
0
;
return
0
;
}
}
...
@@ -445,6 +448,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){
...
@@ -445,6 +448,9 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){
int
key_frame
=
!!
(
pkt
->
flags
&
PKT_FLAG_KEY
);
int
key_frame
=
!!
(
pkt
->
flags
&
PKT_FLAG_KEY
);
int
store_sp
=
0
;
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
))
if
(
key_frame
&&
!!
(
nus
->
last_flags
&
FLAG_KEY
))
store_sp
=
1
;
store_sp
=
1
;
...
@@ -563,7 +569,8 @@ static int write_trailer(AVFormatContext *s){
...
@@ -563,7 +569,8 @@ static int write_trailer(AVFormatContext *s){
NUTContext
*
nut
=
s
->
priv_data
;
NUTContext
*
nut
=
s
->
priv_data
;
ByteIOContext
*
bc
=
&
s
->
pb
;
ByteIOContext
*
bc
=
&
s
->
pb
;
write_headers
(
nut
,
bc
);
while
(
nut
->
header_count
<
3
)
write_headers
(
nut
,
bc
);
put_flush_packet
(
bc
);
put_flush_packet
(
bc
);
return
0
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment