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
07c7e71d
Commit
07c7e71d
authored
Feb 17, 2016
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/avienc: Split avi_write_packet_internal() out
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
090b673a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
8 deletions
+17
-8
avienc.c
libavformat/avienc.c
+17
-8
No files found.
libavformat/avienc.c
View file @
07c7e71d
...
...
@@ -79,7 +79,7 @@ typedef struct AVIStream {
AVIIndex
indexes
;
}
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
)
{
...
...
@@ -637,7 +637,7 @@ static int write_skip_frames(AVFormatContext *s, int stream_index, int64_t dts)
empty_packet
.
size
=
0
;
empty_packet
.
data
=
NULL
;
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
);
}
...
...
@@ -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
)
{
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
;
...
...
@@ -665,6 +659,21 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
if
((
ret
=
write_skip_frames
(
s
,
stream_index
,
pkt
->
dts
))
<
0
)
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
)
avist
->
last_dts
=
pkt
->
dts
+
pkt
->
duration
;
...
...
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