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
42f3bc40
Commit
42f3bc40
authored
Jul 21, 2014
by
Dale Curtis
Committed by
Michael Niedermayer
Jul 22, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/adtsenc: Optionally enable ID3 in ADTS.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
c75c594e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
adtsenc.c
libavformat/adtsenc.c
+5
-0
No files found.
libavformat/adtsenc.c
View file @
42f3bc40
...
...
@@ -27,6 +27,7 @@
#include "libavutil/opt.h"
#include "avformat.h"
#include "apetag.h"
#include "id3v2.h"
#define ADTS_HEADER_SIZE 7
...
...
@@ -38,6 +39,7 @@ typedef struct {
int
channel_conf
;
int
pce_size
;
int
apetag
;
int
id3v2tag
;
uint8_t
pce_data
[
MAX_PCE_SIZE
];
}
ADTSContext
;
...
...
@@ -97,6 +99,8 @@ static int adts_write_header(AVFormatContext *s)
ADTSContext
*
adts
=
s
->
priv_data
;
AVCodecContext
*
avc
=
s
->
streams
[
0
]
->
codec
;
if
(
adts
->
id3v2tag
)
ff_id3v2_write_simple
(
s
,
4
,
ID3v2_DEFAULT_MAGIC
);
if
(
avc
->
extradata_size
>
0
&&
adts_decode_extradata
(
s
,
adts
,
avc
->
extradata
,
avc
->
extradata_size
)
<
0
)
return
-
1
;
...
...
@@ -179,6 +183,7 @@ static int adts_write_trailer(AVFormatContext *s)
#define ENC AV_OPT_FLAG_ENCODING_PARAM
#define OFFSET(obj) offsetof(ADTSContext, obj)
static
const
AVOption
options
[]
=
{
{
"write_id3v2"
,
"Enable ID3v2 tag writing"
,
OFFSET
(
id3v2tag
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1
,
ENC
},
{
"write_apetag"
,
"Enable APE tag writing"
,
OFFSET
(
apetag
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1
,
ENC
},
{
NULL
},
};
...
...
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