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
96fc2908
Commit
96fc2908
authored
Feb 25, 2014
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Read bits_per_coded_sample from V_MS/VFW/FOURCC mkv files.
Fixes ticket #3425.
parent
26733570
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
matroskadec.c
libavformat/matroskadec.c
+4
-0
No files found.
libavformat/matroskadec.c
View file @
96fc2908
...
...
@@ -1605,6 +1605,7 @@ static int matroska_read_header(AVFormatContext *s)
uint32_t
fourcc
=
0
;
AVIOContext
b
;
char
*
key_id_base64
=
NULL
;
int
bit_depth
=
-
1
;
/* Apply some sanity checks. */
if
(
track
->
type
!=
MATROSKA_TRACK_TYPE_VIDEO
&&
...
...
@@ -1708,6 +1709,7 @@ static int matroska_read_header(AVFormatContext *s)
&&
track
->
codec_priv
.
size
>=
40
&&
track
->
codec_priv
.
data
!=
NULL
)
{
track
->
ms_compat
=
1
;
bit_depth
=
AV_RL16
(
track
->
codec_priv
.
data
+
14
);
fourcc
=
AV_RL32
(
track
->
codec_priv
.
data
+
16
);
codec_id
=
ff_codec_get_id
(
ff_codec_bmp_tags
,
fourcc
);
extradata_offset
=
40
;
...
...
@@ -1879,6 +1881,8 @@ static int matroska_read_header(AVFormatContext *s)
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_tag
=
fourcc
;
if
(
bit_depth
>=
0
)
st
->
codec
->
bits_per_coded_sample
=
bit_depth
;
st
->
codec
->
width
=
track
->
video
.
pixel_width
;
st
->
codec
->
height
=
track
->
video
.
pixel_height
;
av_reduce
(
&
st
->
sample_aspect_ratio
.
num
,
...
...
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