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
06542267
Commit
06542267
authored
May 18, 2002
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed pcm read
Originally committed as revision 527 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
f57a4535
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
31 deletions
+11
-31
raw.c
libav/raw.c
+11
-31
No files found.
libav/raw.c
View file @
06542267
...
...
@@ -44,7 +44,7 @@ static int raw_read_header(AVFormatContext *s,
{
AVStream
*
st
;
st
=
malloc
(
sizeof
(
AVStream
));
st
=
av_
malloc
(
sizeof
(
AVStream
));
if
(
!
st
)
return
-
1
;
s
->
nb_streams
=
1
;
...
...
@@ -60,7 +60,7 @@ static int raw_read_header(AVFormatContext *s,
st
->
codec
.
codec_type
=
CODEC_TYPE_VIDEO
;
st
->
codec
.
codec_id
=
s
->
format
->
video_codec
;
}
else
{
free
(
st
);
av_
free
(
st
);
return
-
1
;
}
...
...
@@ -83,26 +83,6 @@ static int raw_read_header(AVFormatContext *s,
return
0
;
}
/* raw input */
static
int
pcm_read_header
(
AVFormatContext
*
s
,
AVFormatParameters
*
ap
)
{
AVStream
*
st
;
st
=
malloc
(
sizeof
(
AVStream
));
if
(
!
st
)
return
-
1
;
s
->
nb_streams
=
1
;
s
->
streams
[
0
]
=
st
;
st
->
id
=
0
;
st
->
codec
.
codec_type
=
CODEC_TYPE_AUDIO
;
st
->
codec
.
codec_id
=
s
->
format
->
audio_codec
;
return
0
;
}
#define RAW_PACKET_SIZE 1024
int
raw_read_packet
(
AVFormatContext
*
s
,
...
...
@@ -136,7 +116,7 @@ static int mp3_read_header(AVFormatContext *s,
{
AVStream
*
st
;
st
=
malloc
(
sizeof
(
AVStream
));
st
=
av_
malloc
(
sizeof
(
AVStream
));
if
(
!
st
)
return
-
1
;
s
->
nb_streams
=
1
;
...
...
@@ -268,7 +248,7 @@ AVFormat pcm_s16le_format = {
raw_write_packet
,
raw_write_trailer
,
pcm
_read_header
,
raw
_read_header
,
raw_read_packet
,
raw_read_close
,
};
...
...
@@ -288,7 +268,7 @@ AVFormat pcm_s16be_format = {
raw_write_packet
,
raw_write_trailer
,
pcm
_read_header
,
raw
_read_header
,
raw_read_packet
,
raw_read_close
,
};
...
...
@@ -308,7 +288,7 @@ AVFormat pcm_u16le_format = {
raw_write_packet
,
raw_write_trailer
,
pcm
_read_header
,
raw
_read_header
,
raw_read_packet
,
raw_read_close
,
};
...
...
@@ -328,7 +308,7 @@ AVFormat pcm_u16be_format = {
raw_write_packet
,
raw_write_trailer
,
pcm
_read_header
,
raw
_read_header
,
raw_read_packet
,
raw_read_close
,
};
...
...
@@ -344,7 +324,7 @@ AVFormat pcm_s8_format = {
raw_write_packet
,
raw_write_trailer
,
pcm
_read_header
,
raw
_read_header
,
raw_read_packet
,
raw_read_close
,
};
...
...
@@ -360,7 +340,7 @@ AVFormat pcm_u8_format = {
raw_write_packet
,
raw_write_trailer
,
pcm
_read_header
,
raw
_read_header
,
raw_read_packet
,
raw_read_close
,
};
...
...
@@ -376,7 +356,7 @@ AVFormat pcm_mulaw_format = {
raw_write_packet
,
raw_write_trailer
,
pcm
_read_header
,
raw
_read_header
,
raw_read_packet
,
raw_read_close
,
};
...
...
@@ -392,7 +372,7 @@ AVFormat pcm_alaw_format = {
raw_write_packet
,
raw_write_trailer
,
pcm
_read_header
,
raw
_read_header
,
raw_read_packet
,
raw_read_close
,
};
...
...
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