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
02dba49d
Commit
02dba49d
authored
May 29, 2017
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/adtsenc: add adts_init()
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
c51301db
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
adtsenc.c
libavformat/adtsenc.c
+12
-3
No files found.
libavformat/adtsenc.c
View file @
02dba49d
...
...
@@ -94,13 +94,11 @@ static int adts_decode_extradata(AVFormatContext *s, ADTSContext *adts, const ui
return
0
;
}
static
int
adts_
write_header
(
AVFormatContext
*
s
)
static
int
adts_
init
(
AVFormatContext
*
s
)
{
ADTSContext
*
adts
=
s
->
priv_data
;
AVCodecParameters
*
par
=
s
->
streams
[
0
]
->
codecpar
;
if
(
adts
->
id3v2tag
)
ff_id3v2_write_simple
(
s
,
4
,
ID3v2_DEFAULT_MAGIC
);
if
(
par
->
extradata_size
>
0
)
return
adts_decode_extradata
(
s
,
adts
,
par
->
extradata
,
par
->
extradata_size
);
...
...
@@ -108,6 +106,16 @@ static int adts_write_header(AVFormatContext *s)
return
0
;
}
static
int
adts_write_header
(
AVFormatContext
*
s
)
{
ADTSContext
*
adts
=
s
->
priv_data
;
if
(
adts
->
id3v2tag
)
ff_id3v2_write_simple
(
s
,
4
,
ID3v2_DEFAULT_MAGIC
);
return
0
;
}
static
int
adts_write_frame_header
(
ADTSContext
*
ctx
,
uint8_t
*
buf
,
int
size
,
int
pce_size
)
{
...
...
@@ -220,6 +228,7 @@ AVOutputFormat ff_adts_muxer = {
.
priv_data_size
=
sizeof
(
ADTSContext
),
.
audio_codec
=
AV_CODEC_ID_AAC
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
init
=
adts_init
,
.
write_header
=
adts_write_header
,
.
write_packet
=
adts_write_packet
,
.
write_trailer
=
adts_write_trailer
,
...
...
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