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
a7219529
Commit
a7219529
authored
Aug 21, 2012
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples/decoding_encoding: flush audio frames in the encoder
parent
535df748
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
decoding_encoding.c
doc/examples/decoding_encoding.c
+14
-0
No files found.
doc/examples/decoding_encoding.c
View file @
a7219529
...
@@ -205,6 +205,20 @@ static void audio_encode_example(const char *filename)
...
@@ -205,6 +205,20 @@ static void audio_encode_example(const char *filename)
av_free_packet
(
&
pkt
);
av_free_packet
(
&
pkt
);
}
}
}
}
/* get the delayed frames */
for
(
got_output
=
1
;
got_output
;
i
++
)
{
ret
=
avcodec_encode_audio2
(
c
,
&
pkt
,
NULL
,
&
got_output
);
if
(
ret
<
0
)
{
fprintf
(
stderr
,
"error encoding frame
\n
"
);
exit
(
1
);
}
if
(
got_output
)
{
fwrite
(
pkt
.
data
,
1
,
pkt
.
size
,
f
);
av_free_packet
(
&
pkt
);
}
}
fclose
(
f
);
fclose
(
f
);
av_freep
(
&
samples
);
av_freep
(
&
samples
);
...
...
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