[vlc-devel] commit: Fixed filter_chain for vout hack. (Laurent Aimar )
git version control
git at videolan.org
Wed Jul 23 23:46:00 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Wed Jul 23 23:45:49 2008 +0200| [b36442584efd53e0ec4d7741b1bc752fd03b615f]
Fixed filter_chain for vout hack.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b36442584efd53e0ec4d7741b1bc752fd03b615f
---
src/misc/filter_chain.c | 19 ++++++++++++++++---
1 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c
index 7f7155b..2bf2414 100644
--- a/src/misc/filter_chain.c
+++ b/src/misc/filter_chain.c
@@ -346,19 +346,32 @@ picture_t *filter_chain_VideoFilter( filter_chain_t *p_chain, picture_t *p_pic )
{
filter_t *p_filter = pp_filter[i];
picture_t *p_newpic = p_filter->pf_video_filter( p_filter, p_pic );
- if( !p_newpic )
- return NULL;
+
/* FIXME Ugly hack to make it work in picture core.
* FIXME Remove this code when the picture release API has been
* FIXME cleaned up (a git revert of the commit should work) */
if( p_chain->p_this->i_object_type == VLC_OBJECT_VOUT )
{
+ vout_thread_t *p_vout = (vout_thread_t*)p_chain->p_this;
+
+ vlc_mutex_lock( &p_vout->picture_lock );
if( p_pic->i_refcount )
+ {
p_pic->i_status = DISPLAYED_PICTURE;
+ }
else
+ {
p_pic->i_status = DESTROYED_PICTURE;
- p_newpic->i_status = READY_PICTURE;
+ p_vout->i_heap_size--;
+ }
+ vlc_mutex_unlock( &p_vout->picture_lock );
+
+ if( p_newpic )
+ p_newpic->i_status = READY_PICTURE;
}
+ if( !p_newpic )
+ return NULL;
+
p_pic = p_newpic;
}
return p_pic;
More information about the vlc-devel
mailing list