On Recieving Suspend confirmation from remote device,
Media task timer reload and tx_timer is made false,
hence media task will not be stopped at that instant.
Media task timer expires causing buffer to be allocated.
Changes done to ensure buffer is allocated only if tx_timer
is true.
Change-Id: I971a82cccc64ba033475ad532b096862968de942
log_tstamps_us("media task tx timer");
#if (BTA_AV_INCLUDED == TRUE)
- btif_media_send_aa_frame();
+ if(btif_media_cb.is_tx_timer == TRUE)
+ {
+ btif_media_send_aa_frame();
+ }
+ else
+ {
+ APPL_TRACE_ERROR0("ERROR Media task Scheduled after Suspend");
+ }
#endif
}
/* break read loop if timer was stopped (media task stopped) */
if ( btif_media_cb.is_tx_timer == FALSE )
+ {
+ GKI_freebuf(p_buf);
return;
+ }
}
} while (((p_buf->len + btif_media_cb.encoder.u16PacketLength) < btif_media_cb.TxAaMtuSize)