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
f2f8632a
Commit
f2f8632a
authored
Dec 27, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffmpeg: Check that frames are user type before treating them as such
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
80d2ddda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
ffmpeg.c
ffmpeg.c
+4
-1
No files found.
ffmpeg.c
View file @
f2f8632a
...
@@ -573,6 +573,9 @@ static void codec_release_buffer(AVCodecContext *s, AVFrame *frame)
...
@@ -573,6 +573,9 @@ static void codec_release_buffer(AVCodecContext *s, AVFrame *frame)
FrameBuffer
*
buf
=
frame
->
opaque
;
FrameBuffer
*
buf
=
frame
->
opaque
;
int
i
;
int
i
;
if
(
frame
->
type
!=
FF_BUFFER_TYPE_USER
)
return
avcodec_default_release_buffer
(
s
,
frame
);
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
frame
->
data
);
i
++
)
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
frame
->
data
);
i
++
)
frame
->
data
[
i
]
=
NULL
;
frame
->
data
[
i
]
=
NULL
;
...
@@ -2051,7 +2054,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
...
@@ -2051,7 +2054,7 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int
if
(
!
frame_sample_aspect
->
num
)
if
(
!
frame_sample_aspect
->
num
)
*
frame_sample_aspect
=
ist
->
st
->
sample_aspect_ratio
;
*
frame_sample_aspect
=
ist
->
st
->
sample_aspect_ratio
;
decoded_frame
->
pts
=
ist
->
pts
;
decoded_frame
->
pts
=
ist
->
pts
;
if
(
ist
->
dr1
)
{
if
(
ist
->
dr1
&&
decoded_frame
->
type
==
FF_BUFFER_TYPE_USER
)
{
FrameBuffer
*
buf
=
decoded_frame
->
opaque
;
FrameBuffer
*
buf
=
decoded_frame
->
opaque
;
AVFilterBufferRef
*
fb
=
avfilter_get_video_buffer_ref_from_arrays
(
AVFilterBufferRef
*
fb
=
avfilter_get_video_buffer_ref_from_arrays
(
decoded_frame
->
data
,
decoded_frame
->
linesize
,
decoded_frame
->
data
,
decoded_frame
->
linesize
,
...
...
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