Skip to content

Commit

Permalink
codec: shine: reset busy state on error
Browse files Browse the repository at this point in the history
Shine encoder can only be opened in one instance, but the codec won't be
busy if the encoder failed to open.
  • Loading branch information
alexandre-janniaux authored and fkuehne committed Jan 13, 2023
1 parent 7142011 commit fec3a81
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions modules/codec/shine.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ static int OpenEncoder( vlc_object_t *p_this )
cfg.mpeg.bitr = p_enc->fmt_out.i_bitrate / 1000;

if (shine_check_config(cfg.wave.samplerate, cfg.mpeg.bitr) == -1) {
atomic_store(&busy, false);
msg_Err(p_enc, "Invalid bitrate %d\n", cfg.mpeg.bitr);
free(p_sys);
return VLC_EGENERIC;
Expand Down

0 comments on commit fec3a81

Please sign in to comment.