Changeset 2dba69cc4c2fb5693b8481ac69c71576f491bc0a
- Timestamp:
- 26/04/05 23:35:03
(4 years ago)
- Author:
- Sigmund Augdal Helberg <sigmunau@videolan.org>
- git-committer:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1114551303 +0000
- git-parent:
[f657cab57aa76d0c96fa49f4d086c982d84c1db5]
- git-author:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1114551303 +0000
- Message:
input/var.c: don't try to update the "rate" variable directly in callback
for "rate-faster" and "rate-slower". input_ControlPush will handle it. This
fixes a race condition when "rate" ends up at a different value than
p_input->i_rate
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r02d6384 |
r2dba69c |
|
| 483 | 483 | { |
|---|
| 484 | 484 | input_ControlPush( p_input, INPUT_CONTROL_SET_RATE_SLOWER, NULL ); |
|---|
| 485 | | |
|---|
| 486 | | /* Fix "rate" value */ |
|---|
| 487 | | i_rate = var_GetInteger( p_input, "rate" ) * 2; |
|---|
| 488 | | if( i_rate < INPUT_RATE_MIN ) i_rate = INPUT_RATE_MIN; |
|---|
| 489 | | val.i_int = i_rate; |
|---|
| 490 | | var_Change( p_input, "rate", VLC_VAR_SETVALUE, &val, NULL ); |
|---|
| 491 | 485 | } |
|---|
| 492 | 486 | else if( !strcmp( psz_cmd, "rate-faster" ) ) |
|---|
| 493 | 487 | { |
|---|
| 494 | 488 | input_ControlPush( p_input, INPUT_CONTROL_SET_RATE_FASTER, NULL ); |
|---|
| 495 | | i_rate = var_GetInteger( p_input, "rate" ) / 2; |
|---|
| 496 | | |
|---|
| 497 | | if( i_rate > INPUT_RATE_MAX ) i_rate = INPUT_RATE_MAX; |
|---|
| 498 | | val.i_int = i_rate; |
|---|
| 499 | | var_Change( p_input, "rate", VLC_VAR_SETVALUE, &val, NULL ); |
|---|
| 500 | 489 | } |
|---|
| 501 | 490 | else |
|---|