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
535d09a5
Commit
535d09a5
authored
Jan 15, 2016
by
Mats Peterson
Committed by
Michael Niedermayer
Jan 16, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavf/matroskadec: Get sample size from private data
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
a51c8a68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
matroskadec.c
libavformat/matroskadec.c
+8
-2
No files found.
libavformat/matroskadec.c
View file @
535d09a5
...
@@ -1891,18 +1891,24 @@ static int matroska_parse_tracks(AVFormatContext *s)
...
@@ -1891,18 +1891,24 @@ static int matroska_parse_tracks(AVFormatContext *s)
/* Normally 36, but allow noncompliant private data */
/* Normally 36, but allow noncompliant private data */
&&
(
track
->
codec_priv
.
size
>=
32
)
&&
(
track
->
codec_priv
.
size
>=
32
)
&&
(
track
->
codec_priv
.
data
))
{
&&
(
track
->
codec_priv
.
data
))
{
uint16_t
sample_size
;
int
ret
=
get_qt_codec
(
track
,
&
fourcc
,
&
codec_id
);
int
ret
=
get_qt_codec
(
track
,
&
fourcc
,
&
codec_id
);
if
(
ret
<
0
)
if
(
ret
<
0
)
return
ret
;
return
ret
;
sample_size
=
AV_RB16
(
track
->
codec_priv
.
data
+
26
);
if
(
fourcc
==
0
)
{
if
(
fourcc
==
0
)
{
if
(
track
->
audio
.
bitdepth
==
8
)
{
if
(
sample_size
==
8
)
{
fourcc
=
MKTAG
(
'r'
,
'a'
,
'w'
,
' '
);
fourcc
=
MKTAG
(
'r'
,
'a'
,
'w'
,
' '
);
codec_id
=
ff_codec_get_id
(
ff_codec_movaudio_tags
,
fourcc
);
codec_id
=
ff_codec_get_id
(
ff_codec_movaudio_tags
,
fourcc
);
}
else
if
(
track
->
audio
.
bitdepth
==
16
)
{
}
else
if
(
sample_size
==
16
)
{
fourcc
=
MKTAG
(
't'
,
'w'
,
'o'
,
's'
);
fourcc
=
MKTAG
(
't'
,
'w'
,
'o'
,
's'
);
codec_id
=
ff_codec_get_id
(
ff_codec_movaudio_tags
,
fourcc
);
codec_id
=
ff_codec_get_id
(
ff_codec_movaudio_tags
,
fourcc
);
}
}
}
}
if
((
fourcc
==
MKTAG
(
't'
,
'w'
,
'o'
,
's'
)
||
fourcc
==
MKTAG
(
's'
,
'o'
,
'w'
,
't'
))
&&
sample_size
==
8
)
codec_id
=
AV_CODEC_ID_PCM_S8
;
}
else
if
(
!
strcmp
(
track
->
codec_id
,
"V_QUICKTIME"
)
&&
}
else
if
(
!
strcmp
(
track
->
codec_id
,
"V_QUICKTIME"
)
&&
(
track
->
codec_priv
.
size
>=
21
)
&&
(
track
->
codec_priv
.
size
>=
21
)
&&
(
track
->
codec_priv
.
data
))
{
(
track
->
codec_priv
.
data
))
{
...
...
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