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
33908f08
Commit
33908f08
authored
Aug 27, 2015
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/mov: Support unusual alac files without frma and alac atoms.
Fixes ticket #4747.
parent
7f9656f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
mov.c
libavformat/mov.c
+26
-0
No files found.
libavformat/mov.c
View file @
33908f08
...
...
@@ -1436,6 +1436,32 @@ static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom)
if
(
ret
<
0
)
return
ret
;
}
else
if
(
atom
.
size
>
8
)
{
/* to read frma, esds atoms */
if
(
st
->
codec
->
codec_id
==
AV_CODEC_ID_ALAC
&&
atom
.
size
>=
24
)
{
uint64_t
buffer
;
ret
=
ffio_ensure_seekback
(
pb
,
8
);
if
(
ret
<
0
)
return
ret
;
buffer
=
avio_rb64
(
pb
);
atom
.
size
-=
8
;
if
(
(
buffer
&
0xFFFFFFFF
)
==
MKBETAG
(
'f'
,
'r'
,
'm'
,
'a'
)
&&
buffer
>>
32
<=
atom
.
size
&&
buffer
>>
32
>=
8
)
{
avio_skip
(
pb
,
-
8
);
atom
.
size
+=
8
;
}
else
if
(
!
st
->
codec
->
extradata_size
)
{
#define ALAC_EXTRADATA_SIZE 36
st
->
codec
->
extradata
=
av_mallocz
(
ALAC_EXTRADATA_SIZE
+
AV_INPUT_BUFFER_PADDING_SIZE
);
if
(
!
st
->
codec
->
extradata
)
return
AVERROR
(
ENOMEM
);
st
->
codec
->
extradata_size
=
ALAC_EXTRADATA_SIZE
;
AV_WB32
(
st
->
codec
->
extradata
,
ALAC_EXTRADATA_SIZE
);
AV_WB32
(
st
->
codec
->
extradata
+
4
,
MKTAG
(
'a'
,
'l'
,
'a'
,
'c'
));
AV_WB64
(
st
->
codec
->
extradata
+
12
,
buffer
);
avio_read
(
pb
,
st
->
codec
->
extradata
+
20
,
16
);
avio_skip
(
pb
,
atom
.
size
-
24
);
return
0
;
}
}
if
((
ret
=
mov_read_default
(
c
,
pb
,
atom
))
<
0
)
return
ret
;
}
else
...
...
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