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

Commit 6c41e622 authored by Marco Nelissen's avatar Marco Nelissen
Browse files

When aggregating buffers, make sure we don't lose data

Bug: 18277034
Change-Id: Ia8c35791eea88545a873cad339eb6b5fc25d1d97
parent 35b0f709
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1321,6 +1321,12 @@ status_t NuPlayer::feedDecoderInputData(bool audio, const sp<AMessage> &msg) {
                    // This stream is unaffected by the discontinuity
                    return -EWOULDBLOCK;
                }
            } else if (err == ERROR_END_OF_STREAM
                    && doBufferAggregation && (mAggregateBuffer != NULL)) {
                // send out the last bit of aggregated data
                reply->setBuffer("buffer", mAggregateBuffer);
                mAggregateBuffer.clear();
                err = OK;
            }

            reply->setInt32("err", err);