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
1c4df2ab
Commit
1c4df2ab
authored
Jun 02, 2009
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export data from private streams
Originally committed as revision 19073 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
0802356c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
16 deletions
+23
-16
mpegts.c
libavformat/mpegts.c
+23
-16
No files found.
libavformat/mpegts.c
View file @
1c4df2ab
...
...
@@ -923,6 +923,11 @@ static int mpegts_push_data(MpegTSFilter *filter,
pes
->
header
[
2
]
==
0x01
)
{
/* it must be an mpeg2 PES stream */
code
=
pes
->
header
[
3
]
|
0x100
;
dprintf
(
pes
->
stream
,
"pid=%x pes_code=%#x
\n
"
,
pes
->
pid
,
code
);
if
((
pes
->
st
&&
pes
->
st
->
discard
==
AVDISCARD_ALL
)
||
code
==
0x1be
)
/* padding_stream */
goto
skip
;
/* stream not present in PMT */
if
(
!
pes
->
st
)
...
...
@@ -930,16 +935,27 @@ static int mpegts_push_data(MpegTSFilter *filter,
if
(
!
pes
->
st
)
return
AVERROR
(
ENOMEM
);
if
(
pes
->
st
->
discard
==
AVDISCARD_ALL
||
!
((
code
>=
0x1c0
&&
code
<=
0x1df
)
||
(
code
>=
0x1e0
&&
code
<=
0x1ef
)
||
(
code
==
0x1bd
)
||
(
code
==
0x1fd
)))
goto
skip
;
pes
->
state
=
MPEGTS_PESHEADER_FILL
;
pes
->
total_size
=
AV_RB16
(
pes
->
header
+
4
);
/* NOTE: a zero total size means the PES size is
unbounded */
pes
->
pes_header_size
=
pes
->
header
[
8
]
+
9
;
if
(
!
pes
->
total_size
)
pes
->
total_size
=
MAX_PES_PAYLOAD
;
/* allocate pes buffer */
pes
->
buffer
=
av_malloc
(
pes
->
total_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
pes
->
buffer
)
return
AVERROR
(
ENOMEM
);
if
(
code
!=
0x1bc
&&
code
!=
0x1bf
&&
/* program_stream_map, private_stream_2 */
code
!=
0x1f0
&&
code
!=
0x1f1
&&
/* ECM, EMM */
code
!=
0x1ff
&&
code
!=
0x1f2
&&
/* program_stream_directory, DSMCC_stream */
code
!=
0x1f8
)
{
/* ITU-T Rec. H.222.1 type E stream */
pes
->
state
=
MPEGTS_PESHEADER_FILL
;
pes
->
pes_header_size
=
pes
->
header
[
8
]
+
9
;
}
else
{
pes
->
state
=
MPEGTS_PAYLOAD
;
pes
->
data_index
=
0
;
}
}
else
{
/* otherwise, it should be a table */
/* skip packet */
...
...
@@ -979,15 +995,6 @@ static int mpegts_push_data(MpegTSFilter *filter,
r
+=
5
;
}
if
(
pes
->
total_size
>
pes
->
data_index
-
6
)
pes
->
total_size
-=
pes
->
data_index
-
6
;
else
pes
->
total_size
=
MAX_PES_PAYLOAD
;
/* allocate pes buffer */
pes
->
buffer
=
av_malloc
(
pes
->
total_size
+
FF_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
pes
->
buffer
)
return
AVERROR
(
ENOMEM
);
/* we got the full header. We parse it and get the payload */
pes
->
state
=
MPEGTS_PAYLOAD
;
pes
->
data_index
=
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