Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
6a686d58
Commit
6a686d58
authored
21 years ago
by
Michael Niedermayer
Browse files
Options
Downloads
Patches
Plain Diff
FF_INPUT_BUFFER_PADDING_SIZE
Originally committed as revision 2100 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
ffba1dc0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/apiexample.c
+8
-2
8 additions, 2 deletions
libavcodec/apiexample.c
with
8 additions
and
2 deletions
libavcodec/apiexample.c
+
8
−
2
View file @
6a686d58
...
...
@@ -98,9 +98,12 @@ void audio_decode_example(const char *outfilename, const char *filename)
int
out_size
,
size
,
len
;
FILE
*
f
,
*
outfile
;
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
"
);
/* 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 */
codec
=
avcodec_find_decoder
(
CODEC_ID_MP2
);
...
...
@@ -297,9 +300,12 @@ void video_decode_example(const char *outfilename, const char *filename)
int
frame
,
size
,
got_picture
,
len
;
FILE
*
f
;
AVFrame
*
picture
;
uint8_t
inbuf
[
INBUF_SIZE
],
*
inbuf_ptr
;
uint8_t
inbuf
[
INBUF_SIZE
+
FF_INPUT_BUFFER_PADDING_SIZE
],
*
inbuf_ptr
;
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
"
);
/* find the mpeg1 video decoder */
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment