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
a1b58a77
Commit
a1b58a77
authored
Mar 03, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed picture leaks when unlinking a non displayed picture.
parent
35a59f2d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
src/input/decoder.c
src/input/decoder.c
+6
-0
src/video_output/vout_pictures.c
src/video_output/vout_pictures.c
+2
-1
No files found.
src/input/decoder.c
View file @
a1b58a77
...
...
@@ -1342,6 +1342,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
vout_DropPicture
(
p_vout
,
p_picture
);
return
;
}
vout_LinkPicture
(
p_vout
,
p_picture
);
/* */
vlc_mutex_lock
(
&
p_owner
->
lock
);
...
...
@@ -1421,6 +1422,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
p_owner
->
i_last_rate
=
i_rate
;
}
vout_DisplayPicture
(
p_vout
,
p_picture
);
vout_UnlinkPicture
(
p_vout
,
p_picture
);
}
else
{
...
...
@@ -1430,6 +1432,7 @@ static void DecoderPlayVideo( decoder_t *p_dec, picture_t *p_picture,
msg_Warn
(
p_vout
,
"non-dated video buffer received"
);
*
pi_lost_sum
+=
1
;
vout_UnlinkPicture
(
p_vout
,
p_picture
);
vout_DropPicture
(
p_vout
,
p_picture
);
}
int
i_tmp_display
;
...
...
@@ -1683,7 +1686,10 @@ static void DecoderFlushBuffering( decoder_t *p_dec )
p_owner
->
buffer
.
i_count
--
;
if
(
p_owner
->
p_vout
)
{
vout_UnlinkPicture
(
p_owner
->
p_vout
,
p_picture
);
vout_DropPicture
(
p_owner
->
p_vout
,
p_picture
);
}
if
(
!
p_owner
->
buffer
.
p_picture
)
p_owner
->
buffer
.
pp_picture_next
=
&
p_owner
->
buffer
.
p_picture
;
...
...
src/video_output/vout_pictures.c
View file @
a1b58a77
...
...
@@ -311,7 +311,8 @@ void vout_UnlinkPicture( vout_thread_t *p_vout, picture_t *p_pic )
msg_Err
(
p_vout
,
"Invalid picture reference count (%p, %d)"
,
p_pic
,
p_pic
->
i_refcount
);
if
(
p_pic
->
i_refcount
==
0
&&
p_pic
->
i_status
==
DISPLAYED_PICTURE
)
if
(
p_pic
->
i_refcount
==
0
&&
(
p_pic
->
i_status
==
DISPLAYED_PICTURE
||
p_pic
->
i_status
==
RESERVED_PICTURE
)
)
DestroyPicture
(
p_vout
,
p_pic
);
vlc_mutex_unlock
(
&
p_vout
->
picture_lock
);
...
...
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