Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
8ffbd86a
Commit
8ffbd86a
authored
Jul 21, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use picture_New/Delete/Release.
parent
a0057ba2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
30 deletions
+10
-30
src/misc/image.c
src/misc/image.c
+10
-30
No files found.
src/misc/image.c
View file @
8ffbd86a
...
@@ -568,44 +568,24 @@ static const char *Fourcc2Ext( vlc_fourcc_t i_codec )
...
@@ -568,44 +568,24 @@ static const char *Fourcc2Ext( vlc_fourcc_t i_codec )
static
void
video_release_buffer
(
picture_t
*
p_pic
)
static
void
video_release_buffer
(
picture_t
*
p_pic
)
{
{
if
(
--
p_pic
->
i_refcount
>
0
)
return
;
picture_Release
(
p_pic
);
free
(
p_pic
->
p_data_orig
);
free
(
p_pic
->
p_sys
);
free
(
p_pic
);
}
}
static
picture_t
*
video_new_buffer
(
decoder_t
*
p_dec
)
static
picture_t
*
video_new_buffer
(
decoder_t
*
p_dec
)
{
{
picture_t
*
p_pic
=
malloc
(
sizeof
(
picture_t
)
);
return
picture_New
(
p_dec
->
fmt_out
.
video
.
i_chroma
,
p_dec
->
fmt_out
.
video
.
i_width
,
p_dec
->
fmt_out
.
video
.
i_chroma
=
p_dec
->
fmt_out
.
i_codec
;
p_dec
->
fmt_out
.
video
.
i_height
,
vout_AllocatePicture
(
VLC_OBJECT
(
p_dec
),
p_pic
,
p_dec
->
fmt_out
.
video
.
i_aspect
);
p_dec
->
fmt_out
.
video
.
i_chroma
,
p_dec
->
fmt_out
.
video
.
i_width
,
p_dec
->
fmt_out
.
video
.
i_height
,
p_dec
->
fmt_out
.
video
.
i_aspect
);
if
(
!
p_pic
->
i_planes
)
{
free
(
p_pic
);
return
0
;
}
p_pic
->
i_refcount
=
1
;
p_pic
->
pf_release
=
video_release_buffer
;
p_pic
->
i_status
=
RESERVED_PICTURE
;
p_pic
->
p_sys
=
NULL
;
return
p_pic
;
}
}
static
void
video_del_buffer
(
decoder_t
*
p_dec
,
picture_t
*
p_pic
)
static
void
video_del_buffer
(
decoder_t
*
p_dec
,
picture_t
*
p_pic
)
{
{
(
void
)
p_dec
;
if
(
p_pic
->
i_refcount
!=
1
)
free
(
p_pic
->
p_data_orig
);
msg_Err
(
p_dec
,
"invalid picture reference count"
);
free
(
p_pic
->
p_sys
);
free
(
p_pic
);
p_pic
->
i_refcount
=
0
;
picture_Delete
(
p_pic
);
}
}
static
void
video_link_picture
(
decoder_t
*
p_dec
,
picture_t
*
p_pic
)
static
void
video_link_picture
(
decoder_t
*
p_dec
,
picture_t
*
p_pic
)
...
...
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