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
1c668624
Commit
1c668624
authored
Dec 17, 2011
by
Luca Barbato
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegts: rename payload_index to payload_size
It holds the size of the current payload.
parent
02e8f032
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
mpegtsenc.c
libavformat/mpegtsenc.c
+9
-9
No files found.
libavformat/mpegtsenc.c
View file @
1c668624
...
...
@@ -201,7 +201,7 @@ typedef struct MpegTSWriteStream {
struct
MpegTSService
*
service
;
int
pid
;
/* stream associated pid */
int
cc
;
int
payload_
index
;
int
payload_
size
;
int
first_pts_check
;
///< first pts check needed
int64_t
payload_pts
;
int64_t
payload_dts
;
...
...
@@ -1006,21 +1006,21 @@ static int mpegts_write_packet(AVFormatContext *s, AVPacket *pkt)
return
0
;
}
if
(
ts_st
->
payload_
index
+
size
>
DEFAULT_PES_PAYLOAD_SIZE
)
{
mpegts_write_pes
(
s
,
st
,
ts_st
->
payload
,
ts_st
->
payload_
index
,
if
(
ts_st
->
payload_
size
+
size
>
DEFAULT_PES_PAYLOAD_SIZE
)
{
mpegts_write_pes
(
s
,
st
,
ts_st
->
payload
,
ts_st
->
payload_
size
,
ts_st
->
payload_pts
,
ts_st
->
payload_dts
,
ts_st
->
payload_flags
&
AV_PKT_FLAG_KEY
);
ts_st
->
payload_
index
=
0
;
ts_st
->
payload_
size
=
0
;
}
if
(
!
ts_st
->
payload_
index
)
{
if
(
!
ts_st
->
payload_
size
)
{
ts_st
->
payload_pts
=
pts
;
ts_st
->
payload_dts
=
dts
;
ts_st
->
payload_flags
=
pkt
->
flags
;
}
memcpy
(
ts_st
->
payload
+
ts_st
->
payload_
index
,
buf
,
size
);
ts_st
->
payload_
index
+=
size
;
memcpy
(
ts_st
->
payload
+
ts_st
->
payload_
size
,
buf
,
size
);
ts_st
->
payload_
size
+=
size
;
av_free
(
data
);
...
...
@@ -1039,8 +1039,8 @@ static int mpegts_write_end(AVFormatContext *s)
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
st
=
s
->
streams
[
i
];
ts_st
=
st
->
priv_data
;
if
(
ts_st
->
payload_
index
>
0
)
{
mpegts_write_pes
(
s
,
st
,
ts_st
->
payload
,
ts_st
->
payload_
index
,
if
(
ts_st
->
payload_
size
>
0
)
{
mpegts_write_pes
(
s
,
st
,
ts_st
->
payload
,
ts_st
->
payload_
size
,
ts_st
->
payload_pts
,
ts_st
->
payload_dts
,
ts_st
->
payload_flags
&
AV_PKT_FLAG_KEY
);
}
...
...
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