diff --git a/android/hal-audio.c b/android/hal-audio.c
index 534620a..9807a5d 100644
--- a/android/hal-audio.c
+++ b/android/hal-audio.c
}
}
- /* in resync mode we'll just drop mediapackets */
- if (!ep->resync) {
+ /* we send data only in case codec encoded some data, i.e. some
+ * codecs do internal buffering and output data only if full
+ * frame can be encoded
+ * in resync mode we'll just drop mediapackets
+ */
+ if (written > 0 && !ep->resync) {
/* wait some time for socket to be ready for write,
* but we'll just skip writing data if timeout occurs
*/