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
f1c48c3a
Commit
f1c48c3a
authored
Apr 22, 2014
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mpegtsenc: make the pes packet length omission optional
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
60fcc19b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
mpegtsenc.c
libavformat/mpegtsenc.c
+5
-1
No files found.
libavformat/mpegtsenc.c
View file @
f1c48c3a
...
...
@@ -86,6 +86,8 @@ typedef struct MpegTSWrite {
int
flags
;
int
copyts
;
int
tables_version
;
int
omit_video_pes_length
}
MpegTSWrite
;
/* a PES packet header is generated every DEFAULT_PES_HEADER_FREQ packets */
...
...
@@ -124,6 +126,8 @@ static const AVOption options[] = {
offsetof
(
MpegTSWrite
,
copyts
),
AV_OPT_TYPE_INT
,
{.
i64
=-
1
},
-
1
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"tables_version"
,
"set PAT, PMT and SDT version"
,
offsetof
(
MpegTSWrite
,
tables_version
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
31
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
"omit_video_pes_length"
,
"Ommit the PES packet length for video packets"
,
offsetof
(
MpegTSWrite
,
omit_video_pes_length
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
AV_OPT_FLAG_ENCODING_PARAM
},
{
NULL
},
};
...
...
@@ -1066,7 +1070,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
}
if
(
len
>
0xffff
)
len
=
0
;
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
{
if
(
ts
->
omit_video_pes_length
&&
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
{
len
=
0
;
}
*
q
++
=
len
>>
8
;
...
...
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