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
d7ca9149
Commit
d7ca9149
authored
May 02, 2014
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegts: factorize pes packet state reset function
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
e2752de3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
6 deletions
+10
-6
mpegts.c
libavformat/mpegts.c
+10
-6
No files found.
libavformat/mpegts.c
View file @
d7ca9149
...
@@ -787,6 +787,15 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
...
@@ -787,6 +787,15 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes,
return
0
;
return
0
;
}
}
static
void
reset_pes_packet_state
(
PESContext
*
pes
)
{
pes
->
pts
=
AV_NOPTS_VALUE
;
pes
->
dts
=
AV_NOPTS_VALUE
;
pes
->
buffer
=
NULL
;
pes
->
data_index
=
0
;
pes
->
flags
=
0
;
}
static
void
new_pes_packet
(
PESContext
*
pes
,
AVPacket
*
pkt
)
static
void
new_pes_packet
(
PESContext
*
pes
,
AVPacket
*
pkt
)
{
{
av_init_packet
(
pkt
);
av_init_packet
(
pkt
);
...
@@ -814,12 +823,7 @@ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
...
@@ -814,12 +823,7 @@ static void new_pes_packet(PESContext *pes, AVPacket *pkt)
pkt
->
pos
=
pes
->
ts_packet_pos
;
pkt
->
pos
=
pes
->
ts_packet_pos
;
pkt
->
flags
=
pes
->
flags
;
pkt
->
flags
=
pes
->
flags
;
/* reset pts values */
reset_pes_packet_state
(
pes
);
pes
->
pts
=
AV_NOPTS_VALUE
;
pes
->
dts
=
AV_NOPTS_VALUE
;
pes
->
buffer
=
NULL
;
pes
->
data_index
=
0
;
pes
->
flags
=
0
;
}
}
static
uint64_t
get_ts64
(
GetBitContext
*
gb
,
int
bits
)
static
uint64_t
get_ts64
(
GetBitContext
*
gb
,
int
bits
)
...
...
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