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
ad8dabfe
Commit
ad8dabfe
authored
Jul 15, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mov/aac: skip initial aac padding
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
b688c7b7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
isom.h
libavformat/isom.h
+1
-0
mov.c
libavformat/mov.c
+12
-0
aac.mak
tests/fate/aac.mak
+15
-0
No files found.
libavformat/isom.h
View file @
ad8dabfe
...
...
@@ -135,6 +135,7 @@ typedef struct MOVStreamContext {
int64_t
data_size
;
uint32_t
tmcd_flags
;
///< tmcd track flags
int64_t
track_end
;
///< used for dts generation in fragmented movie files
int
start_pad
;
///< amount of samples to skip due to enc-dec delay
}
MOVStreamContext
;
typedef
struct
MOVContext
{
...
...
libavformat/mov.c
View file @
ad8dabfe
...
...
@@ -3012,6 +3012,15 @@ static int mov_read_header(AVFormatContext *s)
}
export_orphan_timecode
(
s
);
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVStream
*
st
=
s
->
streams
[
i
];
MOVStreamContext
*
sc
=
st
->
priv_data
;
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_AUDIO
&&
st
->
codec
->
codec_id
==
CODEC_ID_AAC
)
{
sc
->
start_pad
=
2112
;
st
->
skip_samples
=
sc
->
start_pad
;
}
}
if
(
mov
->
trex_data
)
{
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVStream
*
st
=
s
->
streams
[
i
];
...
...
@@ -3187,7 +3196,10 @@ static int mov_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti
seek_timestamp
=
st
->
index_entries
[
sample
].
timestamp
;
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
MOVStreamContext
*
sc
=
s
->
streams
[
i
]
->
priv_data
;
st
=
s
->
streams
[
i
];
st
->
skip_samples
=
(
sample_time
<=
0
)
?
sc
->
start_pad
:
0
;
if
(
stream_index
==
i
)
continue
;
...
...
tests/fate/aac.mak
View file @
ad8dabfe
FATE_AAC += fate-aac-al04_44
fate-aac-al04_44: CMD = pcm -i $(SAMPLES)/aac/al04_44.mp4
fate-aac-al04_44: REF = $(SAMPLES)/aac/al04_44.s16
fate-aac-al04_44: CMP_SHIFT = 4224
FATE_AAC += fate-aac-al05_44
fate-aac-al05_44: CMD = pcm -i $(SAMPLES)/aac/al05_44.mp4
fate-aac-al05_44: REF = $(SAMPLES)/aac/al05_44.s16
fate-aac-al05_44: CMP_SHIFT = 8448
FATE_AAC += fate-aac-al06_44
fate-aac-al06_44: CMD = pcm -i $(SAMPLES)/aac/al06_44.mp4
fate-aac-al06_44: REF = $(SAMPLES)/aac/al06_44_reorder.s16
fate-aac-al06_44: CMP_SHIFT = 12672
FATE_AAC += fate-aac-al07_96
fate-aac-al07_96: CMD = pcm -i $(SAMPLES)/aac/al07_96.mp4
fate-aac-al07_96: REF = $(SAMPLES)/aac/al07_96_reorder.s16
fate-aac-al07_96: CMP_SHIFT = 25344
FATE_AAC += fate-aac-al15_44
fate-aac-al15_44: CMD = pcm -i $(SAMPLES)/aac/al15_44.mp4
fate-aac-al15_44: REF = $(SAMPLES)/aac/al15_44_reorder.s16
fate-aac-al15_44: CMP_SHIFT = 25344
FATE_AAC += fate-aac-al17_44
fate-aac-al17_44: CMD = pcm -i $(SAMPLES)/aac/al17_44.mp4
fate-aac-al17_44: REF = $(SAMPLES)/aac/al17_44.s16
fate-aac-al17_44: CMP_SHIFT = 8448
FATE_AAC += fate-aac-al18_44
fate-aac-al18_44: CMD = pcm -i $(SAMPLES)/aac/al18_44.mp4
fate-aac-al18_44: REF = $(SAMPLES)/aac/al18_44.s16
fate-aac-al18_44: CMP_SHIFT = 4224
FATE_AAC += fate-aac-am00_88
fate-aac-am00_88: CMD = pcm -i $(SAMPLES)/aac/am00_88.mp4
fate-aac-am00_88: REF = $(SAMPLES)/aac/am00_88.s16
fate-aac-am00_88: CMP_SHIFT = 4224
FATE_AAC += fate-aac-am05_44
fate-aac-am05_44: CMD = pcm -i $(SAMPLES)/aac/am05_44.mp4
fate-aac-am05_44: REF = $(SAMPLES)/aac/am05_44_reorder.s16
fate-aac-am05_44: CMP_SHIFT = 25344
FATE_AAC += fate-aac-al_sbr_hq_cm_48_2
fate-aac-al_sbr_hq_cm_48_2: CMD = pcm -i $(SAMPLES)/aac/al_sbr_cm_48_2.mp4
fate-aac-al_sbr_hq_cm_48_2: REF = $(SAMPLES)/aac/al_sbr_hq_cm_48_2.s16
fate-aac-al_sbr_hq_cm_48_2: CMP_SHIFT = 8448
FATE_AAC += fate-aac-al_sbr_hq_cm_48_5.1
fate-aac-al_sbr_hq_cm_48_5.1: CMD = pcm -i $(SAMPLES)/aac/al_sbr_cm_48_5.1.mp4
fate-aac-al_sbr_hq_cm_48_5.1: REF = $(SAMPLES)/aac/al_sbr_hq_cm_48_5.1_reorder.s16
fate-aac-al_sbr_hq_cm_48_5.1: CMP_SHIFT = 25344
FATE_AAC += fate-aac-al_sbr_ps_06_ur
fate-aac-al_sbr_ps_06_ur: CMD = pcm -i $(SAMPLES)/aac/al_sbr_ps_06_new.mp4
fate-aac-al_sbr_ps_06_ur: REF = $(SAMPLES)/aac/al_sbr_ps_06_ur.s16
fate-aac-al_sbr_ps_06_ur: CMP_SHIFT = 8448
FATE_AAC += fate-aac-latm_000000001180bc60
fate-aac-latm_000000001180bc60: CMD = pcm -i $(SAMPLES)/aac/latm_000000001180bc60.mpg
...
...
@@ -53,6 +65,7 @@ fate-aac-latm_000000001180bc60: REF = $(SAMPLES)/aac/latm_000000001180bc60.s16
FATE_AAC += fate-aac-ap05_48
fate-aac-ap05_48: CMD = pcm -i $(SAMPLES)/aac/ap05_48.mp4
fate-aac-ap05_48: REF = $(SAMPLES)/aac/ap05_48.s16
fate-aac-ap05_48: CMP_SHIFT = 8448
FATE_AAC += fate-aac-latm_stereo_to_51
fate-aac-latm_stereo_to_51: CMD = pcm -i $(SAMPLES)/aac/latm_stereo_to_51.ts -channel_layout 5.1
...
...
@@ -60,6 +73,8 @@ fate-aac-latm_stereo_to_51: REF = $(SAMPLES)/aac/latm_stereo_to_51_ref.s16
fate-aac-ct%: CMD = pcm -i $(SAMPLES)/aac/CT_DecoderCheck/$(@:fate-aac-ct-%=%)
fate-aac-ct%: REF = $(SAMPLES)/aac/CT_DecoderCheck/aacPlusv2.wav
fate-aac-ct%: CMP_SHIFT = 8448
fate-aac-ct-sbr_i-ps_i.aac: CMP_SHIFT = 0
FATE_AAC_CT = sbr_bc-ps_i.3gp \
sbr_bic-ps_i.3gp \
...
...
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