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
5a65fea6
Commit
5a65fea6
authored
May 20, 2013
by
Xidorn Quan
Committed by
Michael Niedermayer
May 20, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avutil/frame: continue to process bufs even if some are empty
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
a67304d0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
frame.c
libavutil/frame.c
+6
-3
No files found.
libavutil/frame.c
View file @
5a65fea6
...
@@ -259,7 +259,9 @@ int av_frame_ref(AVFrame *dst, AVFrame *src)
...
@@ -259,7 +259,9 @@ int av_frame_ref(AVFrame *dst, AVFrame *src)
}
}
/* ref the buffers */
/* ref the buffers */
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
src
->
buf
)
&&
src
->
buf
[
i
];
i
++
)
{
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
src
->
buf
);
i
++
)
{
if
(
!
src
->
buf
[
i
])
continue
;
dst
->
buf
[
i
]
=
av_buffer_ref
(
src
->
buf
[
i
]);
dst
->
buf
[
i
]
=
av_buffer_ref
(
src
->
buf
[
i
]);
if
(
!
dst
->
buf
[
i
])
{
if
(
!
dst
->
buf
[
i
])
{
ret
=
AVERROR
(
ENOMEM
);
ret
=
AVERROR
(
ENOMEM
);
...
@@ -366,7 +368,8 @@ int av_frame_is_writable(AVFrame *frame)
...
@@ -366,7 +368,8 @@ int av_frame_is_writable(AVFrame *frame)
if
(
!
frame
->
buf
[
0
])
if
(
!
frame
->
buf
[
0
])
return
0
;
return
0
;
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
frame
->
buf
)
&&
frame
->
buf
[
i
];
i
++
)
for
(
i
=
0
;
i
<
FF_ARRAY_ELEMS
(
frame
->
buf
);
i
++
)
if
(
frame
->
buf
[
i
])
ret
&=
!!
av_buffer_is_writable
(
frame
->
buf
[
i
]);
ret
&=
!!
av_buffer_is_writable
(
frame
->
buf
[
i
]);
for
(
i
=
0
;
i
<
frame
->
nb_extended_buf
;
i
++
)
for
(
i
=
0
;
i
<
frame
->
nb_extended_buf
;
i
++
)
ret
&=
!!
av_buffer_is_writable
(
frame
->
extended_buf
[
i
]);
ret
&=
!!
av_buffer_is_writable
(
frame
->
extended_buf
[
i
]);
...
...
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