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
5fec3a25
Commit
5fec3a25
authored
Jun 13, 2011
by
Aurelien Jacobs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
matroskadec: use a temporary fourcc variable
parent
f440f742
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
matroskadec.c
libavformat/matroskadec.c
+7
-5
No files found.
libavformat/matroskadec.c
View file @
5fec3a25
...
...
@@ -1281,6 +1281,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
uint8_t
*
extradata
=
NULL
;
int
extradata_size
=
0
;
int
extradata_offset
=
0
;
uint32_t
fourcc
=
0
;
AVIOContext
b
;
/* Apply some sanity checks. */
...
...
@@ -1302,6 +1303,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
track
->
video
.
display_width
=
track
->
video
.
pixel_width
;
if
(
!
track
->
video
.
display_height
)
track
->
video
.
display_height
=
track
->
video
.
pixel_height
;
fourcc
=
track
->
video
.
fourcc
;
}
else
if
(
track
->
type
==
MATROSKA_TRACK_TYPE_AUDIO
)
{
if
(
!
track
->
audio
.
out_samplerate
)
track
->
audio
.
out_samplerate
=
track
->
audio
.
samplerate
;
...
...
@@ -1361,8 +1363,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
&&
track
->
codec_priv
.
size
>=
40
&&
track
->
codec_priv
.
data
!=
NULL
)
{
track
->
ms_compat
=
1
;
track
->
video
.
fourcc
=
AV_RL32
(
track
->
codec_priv
.
data
+
16
);
codec_id
=
ff_codec_get_id
(
ff_codec_bmp_tags
,
track
->
video
.
fourcc
);
fourcc
=
AV_RL32
(
track
->
codec_priv
.
data
+
16
);
codec_id
=
ff_codec_get_id
(
ff_codec_bmp_tags
,
fourcc
);
extradata_offset
=
40
;
}
else
if
(
!
strcmp
(
track
->
codec_id
,
"A_MS/ACM"
)
&&
track
->
codec_priv
.
size
>=
14
...
...
@@ -1378,8 +1380,8 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
else
if
(
!
strcmp
(
track
->
codec_id
,
"V_QUICKTIME"
)
&&
(
track
->
codec_priv
.
size
>=
86
)
&&
(
track
->
codec_priv
.
data
!=
NULL
))
{
track
->
video
.
fourcc
=
AV_RL32
(
track
->
codec_priv
.
data
);
codec_id
=
ff_codec_get_id
(
codec_movvideo_tags
,
track
->
video
.
fourcc
);
fourcc
=
AV_RL32
(
track
->
codec_priv
.
data
);
codec_id
=
ff_codec_get_id
(
codec_movvideo_tags
,
fourcc
);
}
else
if
(
codec_id
==
CODEC_ID_PCM_S16BE
)
{
switch
(
track
->
audio
.
bitdepth
)
{
case
8
:
codec_id
=
CODEC_ID_PCM_U8
;
break
;
...
...
@@ -1500,7 +1502,7 @@ static int matroska_read_header(AVFormatContext *s, AVFormatParameters *ap)
MatroskaTrackPlane
*
planes
=
track
->
operation
.
combine_planes
.
elem
;
st
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
st
->
codec
->
codec_tag
=
track
->
video
.
fourcc
;
st
->
codec
->
codec_tag
=
fourcc
;
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