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
e13d8023
Commit
e13d8023
authored
Feb 14, 2007
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
doxy for avcodec_encode_video()
Originally committed as revision 7977 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
e3728626
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
utils.c
libavcodec/utils.c
+8
-1
No files found.
libavcodec/utils.c
View file @
e13d8023
...
@@ -860,6 +860,13 @@ int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
...
@@ -860,6 +860,13 @@ int avcodec_encode_audio(AVCodecContext *avctx, uint8_t *buf, int buf_size,
return
0
;
return
0
;
}
}
/**
* encode a frame.
* @param buf buffer for the bitstream of encoded frame
* @param buf_size the size of the buffer in bytes
* @param pict the input picture to encode, in avctx.pix_fmt
* @return -1 if error
*/
int
avcodec_encode_video
(
AVCodecContext
*
avctx
,
uint8_t
*
buf
,
int
buf_size
,
int
avcodec_encode_video
(
AVCodecContext
*
avctx
,
uint8_t
*
buf
,
int
buf_size
,
const
AVFrame
*
pict
)
const
AVFrame
*
pict
)
{
{
...
@@ -938,7 +945,7 @@ int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
...
@@ -938,7 +945,7 @@ int avcodec_decode_audio2(AVCodecContext *avctx, int16_t *samples,
if
(
*
frame_size_ptr
<
FF_MIN_BUFFER_SIZE
||
if
(
*
frame_size_ptr
<
FF_MIN_BUFFER_SIZE
||
*
frame_size_ptr
<
avctx
->
channels
*
avctx
->
frame_size
*
sizeof
(
int16_t
)
||
*
frame_size_ptr
<
avctx
->
channels
*
avctx
->
frame_size
*
sizeof
(
int16_t
)
||
*
frame_size_ptr
<
buf_size
){
*
frame_size_ptr
<
buf_size
){
av_log
(
avctx
,
AV_LOG_ERROR
,
"buffer
too small
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"buffer
%d too small
\n
"
,
*
frame_size_ptr
);
return
-
1
;
return
-
1
;
}
}
if
((
avctx
->
codec
->
capabilities
&
CODEC_CAP_DELAY
)
||
buf_size
){
if
((
avctx
->
codec
->
capabilities
&
CODEC_CAP_DELAY
)
||
buf_size
){
...
...
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