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
1ceff085
Commit
1ceff085
authored
Apr 04, 2012
by
Ramiro Polla
Committed by
Michael Niedermayer
Apr 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asfenc: rename some variables
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
97d36a18
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
asfenc.c
libavformat/asfenc.c
+10
-10
No files found.
libavformat/asfenc.c
View file @
1ceff085
...
...
@@ -786,9 +786,9 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
{
ASFContext
*
asf
=
s
->
priv_data
;
ASFStream
*
stream
;
int64_t
duration
;
AVCodecContext
*
codec
;
int64_t
packet_st
,
pts
;
uint32_t
packet_number
;
int64_t
pts
;
int
start_sec
,
i
;
int
flags
=
pkt
->
flags
;
...
...
@@ -800,15 +800,15 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
pts
=
(
pkt
->
pts
!=
AV_NOPTS_VALUE
)
?
pkt
->
pts
:
pkt
->
dts
;
assert
(
pts
!=
AV_NOPTS_VALUE
);
duration
=
pts
*
10000
;
asf
->
duration
=
FFMAX
(
asf
->
duration
,
duration
+
pkt
->
duration
*
10000
);
pts
*=
10000
;
asf
->
duration
=
FFMAX
(
asf
->
duration
,
pts
+
pkt
->
duration
*
10000
);
packet_
st
=
asf
->
nb_packets
;
packet_
number
=
asf
->
nb_packets
;
put_frame
(
s
,
stream
,
s
->
streams
[
pkt
->
stream_index
],
pkt
->
dts
,
pkt
->
data
,
pkt
->
size
,
flags
);
/* check index */
if
((
!
asf
->
is_streamed
)
&&
(
flags
&
AV_PKT_FLAG_KEY
))
{
start_sec
=
(
int
)(
duration
/
INT64_C
(
10000000
));
start_sec
=
(
int
)(
pts
/
INT64_C
(
10000000
));
if
(
start_sec
!=
(
int
)(
asf
->
last_indexed_pts
/
INT64_C
(
10000000
)))
{
if
(
start_sec
>
asf
->
nb_index_memory_alloc
)
{
asf
->
nb_index_memory_alloc
=
(
start_sec
+
ASF_INDEX_BLOCK
)
&
~
(
ASF_INDEX_BLOCK
-
1
);
...
...
@@ -816,12 +816,12 @@ static int asf_write_packet(AVFormatContext *s, AVPacket *pkt)
}
for
(
i
=
asf
->
nb_index_count
;
i
<
start_sec
;
i
++
)
{
// store
asf
->
index_ptr
[
i
].
packet_number
=
(
uint32_t
)
packet_
st
;
asf
->
index_ptr
[
i
].
packet_count
=
(
uint16_t
)(
asf
->
nb_packets
-
packet_
st
);
asf
->
maximum_packet
=
FFMAX
(
asf
->
maximum_packet
,
(
uint16_t
)(
asf
->
nb_packets
-
packet_
st
));
asf
->
index_ptr
[
i
].
packet_number
=
(
uint32_t
)
packet_
number
;
asf
->
index_ptr
[
i
].
packet_count
=
(
uint16_t
)(
asf
->
nb_packets
-
packet_
number
);
asf
->
maximum_packet
=
FFMAX
(
asf
->
maximum_packet
,
(
uint16_t
)(
asf
->
nb_packets
-
packet_
number
));
}
asf
->
nb_index_count
=
start_sec
;
asf
->
last_indexed_pts
=
duration
;
asf
->
last_indexed_pts
=
pts
;
}
}
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