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
fa26a29d
Commit
fa26a29d
authored
Aug 08, 2003
by
Fabrice Bellard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add av_new_stream() usage
Originally committed as revision 2109 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ee404803
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
19 deletions
+7
-19
au.c
libavformat/au.c
+1
-8
ffm.c
libavformat/ffm.c
+5
-7
swf.c
libavformat/swf.c
+1
-4
No files found.
libavformat/au.c
View file @
fa26a29d
...
...
@@ -140,16 +140,9 @@ static int au_read_header(AVFormatContext *s,
}
/* now we are ready: build format streams */
st
=
av_
malloc
(
sizeof
(
AVStream
)
);
st
=
av_
new_stream
(
s
,
0
);
if
(
!
st
)
return
-
1
;
avcodec_get_context_defaults
(
&
st
->
codec
);
s
->
nb_streams
=
1
;
s
->
streams
[
0
]
=
st
;
st
->
id
=
0
;
st
->
codec
.
codec_type
=
CODEC_TYPE_AUDIO
;
st
->
codec
.
codec_tag
=
id
;
st
->
codec
.
codec_id
=
codec
;
...
...
libavformat/ffm.c
View file @
fa26a29d
...
...
@@ -368,7 +368,7 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
FFMStream
*
fst
;
ByteIOContext
*
pb
=
&
s
->
pb
;
AVCodecContext
*
codec
;
int
i
;
int
i
,
nb_streams
;
uint32_t
tag
;
/* header */
...
...
@@ -386,17 +386,15 @@ static int ffm_read_header(AVFormatContext *s, AVFormatParameters *ap)
ffm
->
file_size
=
(
uint64_t_C
(
1
)
<<
63
)
-
1
;
}
s
->
nb_streams
=
get_be32
(
pb
);
nb_streams
=
get_be32
(
pb
);
get_be32
(
pb
);
/* total bitrate */
/* read each stream */
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
for
(
i
=
0
;
i
<
nb_streams
;
i
++
)
{
char
rc_eq_buf
[
128
];
st
=
av_
mallocz
(
sizeof
(
AVStream
)
);
st
=
av_
new_stream
(
s
,
0
);
if
(
!
st
)
goto
fail
;
avcodec_get_context_defaults
(
&
st
->
codec
);
s
->
streams
[
i
]
=
st
;
fst
=
av_mallocz
(
sizeof
(
FFMStream
));
if
(
!
fst
)
goto
fail
;
...
...
@@ -611,7 +609,7 @@ offset_t ffm_read_write_index(int fd)
read
(
fd
,
buf
,
8
);
pos
=
0
;
for
(
i
=
0
;
i
<
8
;
i
++
)
pos
|=
buf
[
i
]
<<
(
56
-
i
*
8
);
pos
|=
(
int64_t
)
buf
[
i
]
<<
(
56
-
i
*
8
);
return
pos
;
}
...
...
libavformat/swf.c
View file @
fa26a29d
...
...
@@ -481,17 +481,14 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_le16
(
pb
);
/* if mp3 streaming found, OK */
if
((
v
&
0x20
)
!=
0
)
{
st
=
av_
mallocz
(
sizeof
(
AVStream
)
);
st
=
av_
new_stream
(
s
,
0
);
if
(
!
st
)
return
-
ENOMEM
;
avcodec_get_context_defaults
(
&
st
->
codec
);
if
(
v
&
0x01
)
st
->
codec
.
channels
=
2
;
else
st
->
codec
.
channels
=
1
;
s
->
nb_streams
=
1
;
s
->
streams
[
0
]
=
st
;
switch
((
v
>>
2
)
&
0x03
)
{
case
1
:
...
...
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