summaryrefslogtreecommitdiff
path: root/player.c
diff options
context:
space:
mode:
authorMike Brady <mikebrady@eircom.net>2019-02-26 15:23:11 +0000
committerMike Brady <mikebrady@eircom.net>2019-02-26 15:23:11 +0000
commit20967812ad76e39dec183fd66420212dd23b6ee1 (patch)
tree88f4869767059dd6f7580e8b37cbb9b2a5f6afae /player.c
parentb26d8155292057e4acf400dc8e40f321e6137a7b (diff)
Fix a bug in the activity_monitor software that could lock up a player thread so that it couln't be cancelled. If a player was cancelled while performing an activity script, the activity_monitor_mutex would remain locked.
Diffstat (limited to 'player.c')
-rw-r--r--player.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/player.c b/player.c
index 72a79ef..881a735 100644
--- a/player.c
+++ b/player.c
@@ -682,6 +682,10 @@ static inline void process_sample(int32_t sample, char **outp, enum sps_format_t
break;
case SPS_FORMAT_UNKNOWN:
die("Unexpected SPS_FORMAT_UNKNOWN while calculating dither mask.");
+ break;
+ case SPS_FORMAT_AUTO:
+ die("Unexpected SPS_FORMAT_AUTO while calculating dither mask.");
+ break;
}
dither_mask -= 1;
// int64_t r = r64i();
@@ -758,6 +762,10 @@ static inline void process_sample(int32_t sample, char **outp, enum sps_format_t
break;
case SPS_FORMAT_UNKNOWN:
die("Unexpected SPS_FORMAT_UNKNOWN while outputting samples");
+ break;
+ case SPS_FORMAT_AUTO:
+ die("Unexpected SPS_FORMAT_AUTO while outputting samples");
+ break;
}
*outp += result;
@@ -1644,6 +1652,10 @@ void *player_thread_func(void *arg) {
break;
case SPS_FORMAT_UNKNOWN:
die("Unknown format choosing output bit depth");
+ break;
+ case SPS_FORMAT_AUTO:
+ die("Unexpected SPS_FORMAT_AUTO while outputting samples");
+ break;
}
debug(3, "Output bit depth is %d.", output_bit_depth);