Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
d1409fe9
Commit
d1409fe9
authored
Aug 01, 2019
by
James Almer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/mov: add demuxing support for Dolby TrueHD streams
Signed-off-by:
James Almer
<
jamrial@gmail.com
>
parent
c300fe13
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
1 deletion
+38
-1
Changelog
Changelog
+2
-0
isom.c
libavformat/isom.c
+1
-0
mov.c
libavformat/mov.c
+34
-0
version.h
libavformat/version.h
+1
-1
No files found.
Changelog
View file @
d1409fe9
...
...
@@ -5,6 +5,8 @@ version <next>:
- v360 filter
- Intel QSV-accelerated MJPEG decoding
- Intel QSV-accelerated VP9 decoding
- support for TrueHD in mp4
version 4.2:
- tpad filter
...
...
libavformat/isom.c
View file @
d1409fe9
...
...
@@ -369,6 +369,7 @@ const AVCodecTag ff_codec_movaudio_tags[] = {
{
AV_CODEC_ID_EVRC
,
MKTAG
(
's'
,
'e'
,
'v'
,
'c'
)
},
/* 3GPP2 */
{
AV_CODEC_ID_SMV
,
MKTAG
(
's'
,
's'
,
'm'
,
'v'
)
},
/* 3GPP2 */
{
AV_CODEC_ID_FLAC
,
MKTAG
(
'f'
,
'L'
,
'a'
,
'C'
)
},
/* nonstandard */
{
AV_CODEC_ID_TRUEHD
,
MKTAG
(
'm'
,
'l'
,
'p'
,
'a'
)
},
/* mp4ra.org */
{
AV_CODEC_ID_OPUS
,
MKTAG
(
'O'
,
'p'
,
'u'
,
's'
)
},
/* mp4ra.org */
{
AV_CODEC_ID_NONE
,
0
},
};
...
...
libavformat/mov.c
View file @
d1409fe9
...
...
@@ -49,6 +49,7 @@
#include "libavcodec/ac3tab.h"
#include "libavcodec/flac.h"
#include "libavcodec/mpegaudiodecheader.h"
#include "libavcodec/mlp_parse.h"
#include "avformat.h"
#include "internal.h"
#include "avio_internal.h"
...
...
@@ -6683,6 +6684,38 @@ static int mov_read_dops(MOVContext *c, AVIOContext *pb, MOVAtom atom)
return
0
;
}
static
int
mov_read_dmlp
(
MOVContext
*
c
,
AVIOContext
*
pb
,
MOVAtom
atom
)
{
AVStream
*
st
;
unsigned
format_info
;
int
channel_assignment
,
channel_assignment1
,
channel_assignment2
;
int
ratebits
;
if
(
c
->
fc
->
nb_streams
<
1
)
return
0
;
st
=
c
->
fc
->
streams
[
c
->
fc
->
nb_streams
-
1
];
if
(
atom
.
size
<
10
)
return
AVERROR_INVALIDDATA
;
format_info
=
avio_rb32
(
pb
);
ratebits
=
(
format_info
>>
28
)
&
0xF
;
channel_assignment1
=
(
format_info
>>
15
)
&
0x1F
;
channel_assignment2
=
format_info
&
0x1FFF
;
if
(
channel_assignment2
)
channel_assignment
=
channel_assignment2
;
else
channel_assignment
=
channel_assignment1
;
st
->
codecpar
->
frame_size
=
40
<<
(
ratebits
&
0x7
);
st
->
codecpar
->
sample_rate
=
mlp_samplerate
(
ratebits
);
st
->
codecpar
->
channels
=
truehd_channels
(
channel_assignment
);
st
->
codecpar
->
channel_layout
=
truehd_layout
(
channel_assignment
);
return
0
;
}
static
const
MOVParseTableEntry
mov_default_parse_table
[]
=
{
{
MKTAG
(
'A'
,
'C'
,
'L'
,
'R'
),
mov_read_aclr
},
{
MKTAG
(
'A'
,
'P'
,
'R'
,
'G'
),
mov_read_avid
},
...
...
@@ -6771,6 +6804,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
{
MKTAG
(
's'
,
't'
,
'3'
,
'd'
),
mov_read_st3d
},
/* stereoscopic 3D video box */
{
MKTAG
(
's'
,
'v'
,
'3'
,
'd'
),
mov_read_sv3d
},
/* spherical video box */
{
MKTAG
(
'd'
,
'O'
,
'p'
,
's'
),
mov_read_dops
},
{
MKTAG
(
'd'
,
'm'
,
'l'
,
'p'
),
mov_read_dmlp
},
{
MKTAG
(
'S'
,
'm'
,
'D'
,
'm'
),
mov_read_smdm
},
{
MKTAG
(
'C'
,
'o'
,
'L'
,
'L'
),
mov_read_coll
},
{
MKTAG
(
'v'
,
'p'
,
'c'
,
'C'
),
mov_read_vpcc
},
...
...
libavformat/version.h
View file @
d1409fe9
...
...
@@ -33,7 +33,7 @@
// Also please add any ticket numbers that you believe might be affected here
#define LIBAVFORMAT_VERSION_MAJOR 58
#define LIBAVFORMAT_VERSION_MINOR 31
#define LIBAVFORMAT_VERSION_MICRO 10
2
#define LIBAVFORMAT_VERSION_MICRO 10
3
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
...
...
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