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

Commit ad23bf6b authored by Krishnankutty Kolathappilly's avatar Krishnankutty Kolathappilly Committed by Steve Kondik
Browse files

libstagefright : Fix for grey frame displayed on Seek in HTTP Streaming

-If seek is signaled while cache read is in progress, this frame should
 not be added to the cache.
-Currently this frame is written to the cache and subsequently gets sent
 to the decoder after flush.
-If this frame is not a sync frame, it results in grey frame /artifacts
 at the output.
-Added code to release this buffer and prevent it from being pushed to
 the cache

Change-Id: I1809bec6ba7d943f3c45729ae03812521cda4098
CRs-Fixed: 251274
parent 1338afc5
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -415,6 +415,14 @@ void PrefetchedSource::cacheMore() {
        return;
    }

    if(mSeekTimeUs >= 0) {
        buffer->release();
        buffer = NULL;
        mCurrentlyPrefetching = false;
        mCondition.signal();
        return;
    }

    CHECK(buffer != NULL);

    MediaBuffer *copy = new MediaBuffer(buffer->range_length());