Skip to content

Commit

Permalink
Bluetooth: audio: ascs: Fix missing metadata reset before update
Browse files Browse the repository at this point in the history
The old metadata shall be reset (simply set the couynt to zero) before
reuse or update.

Signed-off-by: Mariusz Skamra <[email protected]>
  • Loading branch information
MariuszSkamra authored and carlescufi committed Aug 23, 2022
1 parent c57ba52 commit a120af8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions subsys/bluetooth/audio/ascs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1676,6 +1676,9 @@ int ascs_ep_set_metadata(struct bt_audio_ep *ep,
return err;
}

/* reset cached metadata */
ep->codec.meta_count = 0;

/* store data contents */
bt_data_parse(&meta_ltv, ascs_codec_store_metadata, codec);

Expand Down

0 comments on commit a120af8

Please sign in to comment.