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
c1fcd7e1
Commit
c1fcd7e1
authored
Sep 08, 2011
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support remuxing aac_latm.
parent
1da43f7e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
latmenc.c
libavformat/latmenc.c
+7
-0
No files found.
libavformat/latmenc.c
View file @
c1fcd7e1
...
...
@@ -25,6 +25,7 @@
#include "libavcodec/mpeg4audio.h"
#include "libavutil/opt.h"
#include "avformat.h"
#include "rawenc.h"
typedef
struct
{
int
off
;
...
...
@@ -75,6 +76,9 @@ static int latm_write_header(AVFormatContext *s)
LATMContext
*
ctx
=
s
->
priv_data
;
AVCodecContext
*
avctx
=
s
->
streams
[
0
]
->
codec
;
if
(
avctx
->
codec_id
==
CODEC_ID_AAC_LATM
)
return
0
;
if
(
avctx
->
extradata_size
>
0
&&
latm_decode_extradata
(
ctx
,
avctx
->
extradata
,
avctx
->
extradata_size
)
<
0
)
return
AVERROR_INVALIDDATA
;
...
...
@@ -135,6 +139,9 @@ static int latm_write_packet(AVFormatContext *s, AVPacket *pkt)
uint8_t
loas_header
[]
=
"
\x56\xe0\x00
"
;
uint8_t
*
buf
;
if
(
s
->
streams
[
0
]
->
codec
->
codec_id
==
CODEC_ID_AAC_LATM
)
return
ff_raw_write_packet
(
s
,
pkt
);
if
(
pkt
->
size
>
2
&&
pkt
->
data
[
0
]
==
0xff
&&
(
pkt
->
data
[
1
]
>>
4
)
==
0xf
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"ADTS header detected - ADTS will not be incorrectly muxed into LATM
\n
"
);
return
AVERROR_INVALIDDATA
;
...
...
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