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
c1f6eca1
Commit
c1f6eca1
authored
Jun 26, 2008
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove a dozen unused variables.
Originally committed as revision 13995 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
a4d64c17
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
34 deletions
+4
-34
psxstr.c
libavformat/psxstr.c
+4
-34
No files found.
libavformat/psxstr.c
View file @
c1f6eca1
...
...
@@ -50,20 +50,10 @@
#define STR_MAGIC (0x80010160)
typedef
struct
StrChannel
{
int
type
;
#define STR_AUDIO 0
#define STR_VIDEO 1
/* video parameters */
int
width
;
int
height
;
int
video_stream_index
;
/* audio parameters */
int
sample_rate
;
int
channels
;
int
bits
;
int
audio_stream_index
;
}
StrChannel
;
...
...
@@ -169,9 +159,6 @@ static int str_read_header(AVFormatContext *s,
if
(
AV_RL32
(
&
sector
[
0x18
])
!=
STR_MAGIC
)
break
;
str
->
video_channel
=
channel
;
str
->
channels
[
channel
].
type
=
STR_VIDEO
;
str
->
channels
[
channel
].
width
=
AV_RL16
(
&
sector
[
0x28
]);
str
->
channels
[
channel
].
height
=
AV_RL16
(
&
sector
[
0x2A
]);
/* allocate a new AVStream */
st
=
av_new_stream
(
s
,
0
);
...
...
@@ -184,8 +171,8 @@ static int str_read_header(AVFormatContext *s,
st
->
codec
->
codec_type
=
CODEC_TYPE_VIDEO
;
st
->
codec
->
codec_id
=
CODEC_ID_MDEC
;
st
->
codec
->
codec_tag
=
0
;
/* no fourcc */
st
->
codec
->
width
=
str
->
channels
[
channel
].
width
;
st
->
codec
->
height
=
str
->
channels
[
channel
].
height
;
st
->
codec
->
width
=
AV_RL16
(
&
sector
[
0x28
])
;
st
->
codec
->
height
=
AV_RL16
(
&
sector
[
0x2A
])
;
}
break
;
...
...
@@ -194,19 +181,11 @@ static int str_read_header(AVFormatContext *s,
if
(
str
->
audio_channel
==
-
1
)
{
int
fmt
;
str
->
audio_channel
=
channel
;
str
->
channels
[
channel
].
type
=
STR_AUDIO
;
str
->
channels
[
channel
].
channels
=
(
sector
[
0x13
]
&
0x01
)
?
2
:
1
;
str
->
channels
[
channel
].
sample_rate
=
(
sector
[
0x13
]
&
0x04
)
?
18900
:
37800
;
str
->
channels
[
channel
].
bits
=
(
sector
[
0x13
]
&
0x10
)
?
8
:
4
;
/* allocate a new AVStream */
st
=
av_new_stream
(
s
,
0
);
if
(
!
st
)
return
AVERROR
(
ENOMEM
);
av_set_pts_info
(
st
,
64
,
128
,
str
->
channels
[
channel
].
sample_rate
);
str
->
channels
[
channel
].
audio_stream_index
=
st
->
index
;
...
...
@@ -218,6 +197,8 @@ static int str_read_header(AVFormatContext *s,
st
->
codec
->
sample_rate
=
(
fmt
&
4
)
?
18900
:
37800
;
// st->codec->bit_rate = 0; //FIXME;
st
->
codec
->
block_align
=
128
;
av_set_pts_info
(
st
,
64
,
128
,
st
->
codec
->
sample_rate
);
}
break
;
...
...
@@ -227,17 +208,6 @@ static int str_read_header(AVFormatContext *s,
}
}
if
(
str
->
video_channel
!=
-
1
)
av_log
(
s
,
AV_LOG_DEBUG
,
" video channel = %d, %d x %d %d
\n
"
,
str
->
video_channel
,
str
->
channels
[
str
->
video_channel
].
width
,
str
->
channels
[
str
->
video_channel
].
height
,
str
->
channels
[
str
->
video_channel
].
video_stream_index
);
if
(
str
->
audio_channel
!=
-
1
)
av_log
(
s
,
AV_LOG_DEBUG
,
" audio channel = %d, %d Hz, %d channels, %d bits/sample %d
\n
"
,
str
->
audio_channel
,
str
->
channels
[
str
->
audio_channel
].
sample_rate
,
str
->
channels
[
str
->
audio_channel
].
channels
,
str
->
channels
[
str
->
audio_channel
].
bits
,
str
->
channels
[
str
->
audio_channel
].
audio_stream_index
);
/* back to the start */
url_fseek
(
pb
,
start
,
SEEK_SET
);
...
...
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