Changeset 127a867bc75e3688f0de69f9abb2ae41dc28faaf
- Timestamp:
- 07/01/08 18:47:38
(2 months ago)
- Author:
- Rémi Denis-Courmont <rdenis@simphalempin.com>
- git-committer:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1214930858 +0300
- git-parent:
[acd09b4c95f13abdced07a7903f11e1217042573]
- git-author:
- Rémi Denis-Courmont <rdenis@simphalempin.com> 1214930543 +0300
- Message:
Do not recycle video outputs - fixes #1651
For the same reason as audio outputs. The code was thread-unsafe beyond
repair.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| racd09b4 |
r127a867 |
|
| 126 | 126 | if( !p_fmt ) |
|---|
| 127 | 127 | { |
|---|
| 128 | | /* Reattach video output to the instance before bailing out */ |
|---|
| | 128 | /* Video output is no longer used. |
|---|
| | 129 | * TODO: support for reusing video outputs with proper _thread-safe_ |
|---|
| | 130 | * reference handling. */ |
|---|
| 129 | 131 | if( p_vout ) |
|---|
| 130 | 132 | { |
|---|
| 131 | 133 | spu_Attach( p_vout->p_spu, p_this, false ); |
|---|
| 132 | | vlc_object_detach( p_vout ); |
|---|
| 133 | | vlc_object_attach( p_vout, p_this->p_libvlc ); |
|---|
| | 134 | vlc_object_release( p_vout ); |
|---|
| 134 | 135 | } |
|---|
| 135 | 136 | return NULL; |
|---|
| … | … | |
| 141 | 142 | vlc_object_yield( p_vout ); |
|---|
| 142 | 143 | } |
|---|
| 143 | | else |
|---|
| 144 | | { |
|---|
| 145 | | p_vout = vlc_object_find( p_this, VLC_OBJECT_VOUT, FIND_CHILD ); |
|---|
| 146 | | |
|---|
| 147 | | if( !p_vout ) |
|---|
| 148 | | { |
|---|
| 149 | | p_vout = vlc_object_find( p_this->p_libvlc, |
|---|
| 150 | | VLC_OBJECT_VOUT, FIND_CHILD ); |
|---|
| 151 | | /* only first children of p_input for unused vout */ |
|---|
| 152 | | if( p_vout && p_vout->p_parent != VLC_OBJECT(p_this->p_libvlc) ) |
|---|
| 153 | | { |
|---|
| 154 | | vlc_object_release( p_vout ); |
|---|
| 155 | | p_vout = NULL; |
|---|
| 156 | | } |
|---|
| 157 | | if( p_vout ) |
|---|
| 158 | | vlc_object_detach( p_vout ); /* Remove it from the GC */ |
|---|
| 159 | | } |
|---|
| 160 | | } |
|---|
| | 144 | |
|---|
| | 145 | /* TODO: find a suitable unused video output */ |
|---|
| 161 | 146 | |
|---|
| 162 | 147 | /* If we now have a video output, check it has the right properties */ |
|---|