Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
6a686d58
Commit
6a686d58
authored
Aug 01, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FF_INPUT_BUFFER_PADDING_SIZE
Originally committed as revision 2100 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ffba1dc0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
apiexample.c
libavcodec/apiexample.c
+8
-2
No files found.
libavcodec/apiexample.c
View file @
6a686d58
...
@@ -98,9 +98,12 @@ void audio_decode_example(const char *outfilename, const char *filename)
...
@@ -98,9 +98,12 @@ void audio_decode_example(const char *outfilename, const char *filename)
int
out_size
,
size
,
len
;
int
out_size
,
size
,
len
;
FILE
*
f
,
*
outfile
;
FILE
*
f
,
*
outfile
;
uint8_t
*
outbuf
;
uint8_t
*
outbuf
;
uint8_t
inbuf
[
INBUF_SIZE
],
*
inbuf_ptr
;
uint8_t
inbuf
[
INBUF_SIZE
+
FF_INPUT_BUFFER_PADDING_SIZE
],
*
inbuf_ptr
;
printf
(
"Audio decoding
\n
"
);
printf
(
"Audio decoding
\n
"
);
/* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
memset
(
inbuf
+
INBUF_SIZE
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
/* find the mpeg audio decoder */
/* find the mpeg audio decoder */
codec
=
avcodec_find_decoder
(
CODEC_ID_MP2
);
codec
=
avcodec_find_decoder
(
CODEC_ID_MP2
);
...
@@ -297,9 +300,12 @@ void video_decode_example(const char *outfilename, const char *filename)
...
@@ -297,9 +300,12 @@ void video_decode_example(const char *outfilename, const char *filename)
int
frame
,
size
,
got_picture
,
len
;
int
frame
,
size
,
got_picture
,
len
;
FILE
*
f
;
FILE
*
f
;
AVFrame
*
picture
;
AVFrame
*
picture
;
uint8_t
inbuf
[
INBUF_SIZE
],
*
inbuf_ptr
;
uint8_t
inbuf
[
INBUF_SIZE
+
FF_INPUT_BUFFER_PADDING_SIZE
],
*
inbuf_ptr
;
char
buf
[
1024
];
char
buf
[
1024
];
/* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
memset
(
inbuf
+
INBUF_SIZE
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
printf
(
"Video decoding
\n
"
);
printf
(
"Video decoding
\n
"
);
/* find the mpeg1 video decoder */
/* find the mpeg1 video decoder */
...
...
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