When tag appears at the last sample of the ouput buffer
it will be added again in the next run of the work function.
Here this issue was solved by changing the codition so the
tag appearing at the end of the output buffer is not added.
Change-Id: Ia4f0923e2071184879a023d0fe01026d8e9ccbda