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
07c7e71d
Commit
07c7e71d
authored
9 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
avformat/avienc: Split avi_write_packet_internal() out
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
090b673a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/avienc.c
+17
-8
17 additions, 8 deletions
libavformat/avienc.c
with
17 additions
and
8 deletions
libavformat/avienc.c
+
17
−
8
View file @
07c7e71d
...
@@ -79,7 +79,7 @@ typedef struct AVIStream {
...
@@ -79,7 +79,7 @@ typedef struct AVIStream {
AVIIndex
indexes
;
AVIIndex
indexes
;
}
AVIStream
;
}
AVIStream
;
static
int
avi_write_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
);
static
int
avi_write_packet
_internal
(
AVFormatContext
*
s
,
AVPacket
*
pkt
);
static
inline
AVIIentry
*
avi_get_ientry
(
const
AVIIndex
*
idx
,
int
ent_id
)
static
inline
AVIIentry
*
avi_get_ientry
(
const
AVIIndex
*
idx
,
int
ent_id
)
{
{
...
@@ -637,7 +637,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
...
@@ -637,7 +637,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
empty_packet
.
size
=
0
;
empty_packet
.
size
=
0
;
empty_packet
.
data
=
NULL
;
empty_packet
.
data
=
NULL
;
empty_packet
.
stream_index
=
stream_index
;
empty_packet
.
stream_index
=
stream_index
;
avi_write_packet
(
s
,
&
empty_packet
);
avi_write_packet
_internal
(
s
,
&
empty_packet
);
ff_dlog
(
s
,
"dup dts:%s packet_count:%d
\n
"
,
av_ts2str
(
dts
),
avist
->
packet_count
);
ff_dlog
(
s
,
"dup dts:%s packet_count:%d
\n
"
,
av_ts2str
(
dts
),
avist
->
packet_count
);
}
}
...
@@ -646,13 +646,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
...
@@ -646,13 +646,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
static
int
avi_write_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
static
int
avi_write_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
{
unsigned
char
tag
[
5
];
unsigned
int
flags
=
0
;
const
int
stream_index
=
pkt
->
stream_index
;
const
int
stream_index
=
pkt
->
stream_index
;
int
size
=
pkt
->
size
;
AVIContext
*
avi
=
s
->
priv_data
;
AVIOContext
*
pb
=
s
->
pb
;
AVIStream
*
avist
=
s
->
streams
[
stream_index
]
->
priv_data
;
AVCodecContext
*
enc
=
s
->
streams
[
stream_index
]
->
codec
;
AVCodecContext
*
enc
=
s
->
streams
[
stream_index
]
->
codec
;
int
ret
;
int
ret
;
...
@@ -665,6 +659,21 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -665,6 +659,21 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
if
((
ret
=
write_skip_frames
(
s
,
stream_index
,
pkt
->
dts
))
<
0
)
if
((
ret
=
write_skip_frames
(
s
,
stream_index
,
pkt
->
dts
))
<
0
)
return
ret
;
return
ret
;
return
avi_write_packet_internal
(
s
,
pkt
);
}
static
int
avi_write_packet_internal
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
unsigned
char
tag
[
5
];
unsigned
int
flags
=
0
;
const
int
stream_index
=
pkt
->
stream_index
;
int
size
=
pkt
->
size
;
AVIContext
*
avi
=
s
->
priv_data
;
AVIOContext
*
pb
=
s
->
pb
;
AVIStream
*
avist
=
s
->
streams
[
stream_index
]
->
priv_data
;
AVCodecContext
*
enc
=
s
->
streams
[
stream_index
]
->
codec
;
int
ret
;
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
)
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
)
avist
->
last_dts
=
pkt
->
dts
+
pkt
->
duration
;
avist
->
last_dts
=
pkt
->
dts
+
pkt
->
duration
;
...
...
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