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
4e70d66d
Commit
4e70d66d
authored
Mar 15, 2013
by
Hendrik Leppkes
Committed by
Anton Khirnov
Mar 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideo: fix allocation of the hwaccel_picture_private data
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
1516bf7a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
mpegvideo.c
libavcodec/mpegvideo.c
+5
-3
No files found.
libavcodec/mpegvideo.c
View file @
4e70d66d
...
...
@@ -269,11 +269,12 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
if
(
s
->
avctx
->
hwaccel
)
{
assert
(
!
pic
->
hwaccel_picture_private
);
if
(
s
->
avctx
->
hwaccel
->
priv_data_size
)
{
pic
->
hwaccel_p
icture_private
=
av_m
allocz
(
s
->
avctx
->
hwaccel
->
priv_data_size
);
if
(
!
pic
->
hwaccel_p
icture_private
)
{
pic
->
hwaccel_p
riv_buf
=
av_buffer_
allocz
(
s
->
avctx
->
hwaccel
->
priv_data_size
);
if
(
!
pic
->
hwaccel_p
riv_buf
)
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"alloc_frame_buffer() failed (hwaccel private data allocation)
\n
"
);
return
-
1
;
}
pic
->
hwaccel_picture_private
=
pic
->
hwaccel_priv_buf
->
data
;
}
}
...
...
@@ -293,7 +294,8 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
if
(
r
<
0
||
!
pic
->
f
.
data
[
0
])
{
av_log
(
s
->
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed (%d %p)
\n
"
,
r
,
pic
->
f
.
data
[
0
]);
av_freep
(
&
pic
->
hwaccel_picture_private
);
av_buffer_unref
(
&
pic
->
hwaccel_priv_buf
);
pic
->
hwaccel_picture_private
=
NULL
;
return
-
1
;
}
...
...
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