Changeset c55222a882256a2c28245dc6cf9486bcf969befd
- Timestamp:
- 10/06/08 16:59:13
(4 months ago)
- Author:
- Antoine Cellerier <dionoea@videolan.org>
- git-committer:
- Antoine Cellerier <dionoea@videolan.org> 1213109953 +0200
- git-parent:
[bb03e12e367a4e3a5e8127fd5ebc1a7eb670c4f0]
- git-author:
- Antoine Cellerier <dionoea@videolan.org> 1213109953 +0200
- Message:
Unregister a "sub filter"'s private SPU channel when destroying the
filter. Since filter destruction is always requested by the subpicture
core itself, we already have the subpicture lock so no need to lock.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| rbb03e12 |
rc55222a |
|
| 1143 | 1143 | * corresponding to i_channel_id. |
|---|
| 1144 | 1144 | *****************************************************************************/ |
|---|
| 1145 | | static void SpuClearChannel( spu_t *p_spu, int i_channel ) |
|---|
| | 1145 | static void SpuClearChannel( spu_t *p_spu, int i_channel, bool b_locked ) |
|---|
| 1146 | 1146 | { |
|---|
| 1147 | 1147 | int i_subpic; /* subpicture index */ |
|---|
| 1148 | 1148 | subpicture_t *p_subpic = NULL; /* first free subpicture */ |
|---|
| 1149 | 1149 | |
|---|
| 1150 | | vlc_mutex_lock( &p_spu->subpicture_lock ); |
|---|
| | 1150 | if( !b_locked ) |
|---|
| | 1151 | vlc_mutex_lock( &p_spu->subpicture_lock ); |
|---|
| 1151 | 1152 | |
|---|
| 1152 | 1153 | for( i_subpic = 0; i_subpic < VOUT_MAX_SUBPICTURES; i_subpic++ ) |
|---|
| … | … | |
| 1174 | 1175 | } |
|---|
| 1175 | 1176 | |
|---|
| 1176 | | vlc_mutex_unlock( &p_spu->subpicture_lock ); |
|---|
| | 1177 | if( !b_locked ) |
|---|
| | 1178 | vlc_mutex_unlock( &p_spu->subpicture_lock ); |
|---|
| 1177 | 1179 | } |
|---|
| 1178 | 1180 | |
|---|
| … | … | |
| 1193 | 1195 | case SPU_CHANNEL_CLEAR: |
|---|
| 1194 | 1196 | i = (int)va_arg( args, int ); |
|---|
| 1195 | | SpuClearChannel( p_spu, i ); |
|---|
| | 1197 | SpuClearChannel( p_spu, i, false ); |
|---|
| 1196 | 1198 | break; |
|---|
| 1197 | 1199 | |
|---|
| … | … | |
| 1365 | 1367 | static void sub_filter_allocation_clear( filter_t *p_filter ) |
|---|
| 1366 | 1368 | { |
|---|
| | 1369 | filter_owner_sys_t *p_sys = p_filter->p_owner; |
|---|
| | 1370 | SpuClearChannel( p_sys->p_spu, p_sys->i_channel, true ); |
|---|
| 1367 | 1371 | free( p_filter->p_owner ); |
|---|
| 1368 | 1372 | } |
|---|