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
558eae03
Commit
558eae03
authored
Mar 20, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
10l
Originally committed as revision 1696 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
d5a21172
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
ffmpeg.c
ffmpeg.c
+3
-2
No files found.
ffmpeg.c
View file @
558eae03
...
@@ -337,6 +337,7 @@ static void do_audio_out(AVFormatContext *s,
...
@@ -337,6 +337,7 @@ static void do_audio_out(AVFormatContext *s,
uint8_t
*
buftmp
;
uint8_t
*
buftmp
;
static
uint8_t
*
audio_buf
=
NULL
;
static
uint8_t
*
audio_buf
=
NULL
;
static
uint8_t
*
audio_out
=
NULL
;
static
uint8_t
*
audio_out
=
NULL
;
const
int
audio_out_size
=
4
*
MAX_AUDIO_PACKET_SIZE
;
int
size_out
,
frame_bytes
,
ret
;
int
size_out
,
frame_bytes
,
ret
;
AVCodecContext
*
enc
;
AVCodecContext
*
enc
;
...
@@ -345,7 +346,7 @@ static void do_audio_out(AVFormatContext *s,
...
@@ -345,7 +346,7 @@ static void do_audio_out(AVFormatContext *s,
if
(
!
audio_buf
)
if
(
!
audio_buf
)
audio_buf
=
av_malloc
(
2
*
MAX_AUDIO_PACKET_SIZE
);
audio_buf
=
av_malloc
(
2
*
MAX_AUDIO_PACKET_SIZE
);
if
(
!
audio_out
)
if
(
!
audio_out
)
audio_out
=
av_malloc
(
4
*
MAX_AUDIO_PACKET_SIZE
);
audio_out
=
av_malloc
(
audio_out_size
);
if
(
!
audio_buf
||
!
audio_out
)
if
(
!
audio_buf
||
!
audio_out
)
return
;
/* Should signal an error ! */
return
;
/* Should signal an error ! */
...
@@ -373,7 +374,7 @@ static void do_audio_out(AVFormatContext *s,
...
@@ -373,7 +374,7 @@ static void do_audio_out(AVFormatContext *s,
while
(
fifo_read
(
&
ost
->
fifo
,
audio_buf
,
frame_bytes
,
while
(
fifo_read
(
&
ost
->
fifo
,
audio_buf
,
frame_bytes
,
&
ost
->
fifo
.
rptr
)
==
0
)
{
&
ost
->
fifo
.
rptr
)
==
0
)
{
ret
=
avcodec_encode_audio
(
enc
,
audio_out
,
sizeof
(
audio_out
)
,
ret
=
avcodec_encode_audio
(
enc
,
audio_out
,
audio_out_size
,
(
short
*
)
audio_buf
);
(
short
*
)
audio_buf
);
av_write_frame
(
s
,
ost
->
index
,
audio_out
,
ret
);
av_write_frame
(
s
,
ost
->
index
,
audio_out
,
ret
);
}
}
...
...
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