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
6bab55b8
Commit
6bab55b8
authored
Mar 02, 2014
by
Marton Balint
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegts: factorize mpegts filter creator code
Signed-off-by:
Marton Balint
<
cus@passwd.hu
>
parent
4acc86bc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
17 deletions
+18
-17
mpegts.c
libavformat/mpegts.c
+18
-17
No files found.
libavformat/mpegts.c
View file @
6bab55b8
...
...
@@ -405,14 +405,10 @@ static void write_section_data(AVFormatContext *s, MpegTSFilter *tss1,
}
}
static
MpegTSFilter
*
mpegts_open_section_filter
(
MpegTSContext
*
ts
,
unsigned
int
pid
,
SectionCallback
*
section_cb
,
void
*
opaque
,
int
check_crc
)
static
MpegTSFilter
*
mpegts_open_filter
(
MpegTSContext
*
ts
,
unsigned
int
pid
,
enum
MpegTSFilterType
type
)
{
MpegTSFilter
*
filter
;
MpegTSSectionFilter
*
sec
;
av_dlog
(
ts
->
stream
,
"Filter: pid=0x%x
\n
"
,
pid
);
...
...
@@ -423,12 +419,26 @@ static MpegTSFilter *mpegts_open_section_filter(MpegTSContext *ts,
return
NULL
;
ts
->
pids
[
pid
]
=
filter
;
filter
->
type
=
MPEGTS_SECTION
;
filter
->
type
=
type
;
filter
->
pid
=
pid
;
filter
->
es_id
=
-
1
;
filter
->
last_cc
=
-
1
;
filter
->
last_pcr
=
-
1
;
return
filter
;
}
static
MpegTSFilter
*
mpegts_open_section_filter
(
MpegTSContext
*
ts
,
unsigned
int
pid
,
SectionCallback
*
section_cb
,
void
*
opaque
,
int
check_crc
)
{
MpegTSFilter
*
filter
;
MpegTSSectionFilter
*
sec
;
if
(
!
(
filter
=
mpegts_open_filter
(
ts
,
pid
,
MPEGTS_SECTION
)))
return
NULL
;
sec
=
&
filter
->
u
.
section_filter
;
sec
->
section_cb
=
section_cb
;
sec
->
opaque
=
opaque
;
...
...
@@ -448,18 +458,9 @@ static MpegTSFilter *mpegts_open_pes_filter(MpegTSContext *ts, unsigned int pid,
MpegTSFilter
*
filter
;
MpegTSPESFilter
*
pes
;
if
(
pid
>=
NB_PID_MAX
||
ts
->
pids
[
pid
])
return
NULL
;
filter
=
av_mallocz
(
sizeof
(
MpegTSFilter
));
if
(
!
filter
)
if
(
!
(
filter
=
mpegts_open_filter
(
ts
,
pid
,
MPEGTS_PES
)))
return
NULL
;
ts
->
pids
[
pid
]
=
filter
;
filter
->
type
=
MPEGTS_PES
;
filter
->
pid
=
pid
;
filter
->
es_id
=
-
1
;
filter
->
last_cc
=
-
1
;
pes
=
&
filter
->
u
.
pes_filter
;
pes
->
pes_cb
=
pes_cb
;
pes
->
opaque
=
opaque
;
...
...
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