Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6647319 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

Catch errors from opus_encode() call

opus_encode() uses negative return values to indicate errors,
so we store the result in a signed integer so we can properly
detect these errors.

Bug: 226441860
Test: TreeHugger
Change-Id: I674c66f146ba86cd12099e8639043042448321fc
parent a1945569
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ static void a2dp_opus_encode_frames(uint8_t nb_frame) {
                      p_encoder_params->channel_mode];

  int32_t out_frames = 0;
  uint32_t written = 0;
  int32_t written = 0;

  uint32_t bytes_read = 0;
  while (nb_frame) {