bug 1324530 - part 5: do not recycle EOS input sample. r=snorp
authorJohn Lin <jolin@mozilla.com>
Fri, 06 Jan 2017 20:04:43 +0800
changeset 374270 38e88586d12263357551c0fafe4508b0ce32d9dc
parent 374269 d9544d6b0b5dc30e5ac0e6a6a9aa4fb148a3df5c
child 374271 3ca4b928621722624e77a9d02ac00314f93baacb
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssnorp
bugs1324530
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1324530 - part 5: do not recycle EOS input sample. r=snorp MozReview-Commit-ID: IbQLII0XTTf
mobile/android/base/java/org/mozilla/gecko/media/Codec.java
--- a/mobile/android/base/java/org/mozilla/gecko/media/Codec.java
+++ b/mobile/android/base/java/org/mozilla/gecko/media/Codec.java
@@ -133,17 +133,19 @@ import java.util.concurrent.ConcurrentLi
                 } else {
                     mCodec.queueInputBuffer(index, 0, len, pts, flags);
                 }
             }
         }
 
         private synchronized void reset() {
             for (Sample s : mInputSamples) {
-                mSamplePool.recycleInput(s);
+                if (!s.isEOS()) {
+                    mSamplePool.recycleInput(s);
+                }
             }
             mInputSamples.clear();
 
             for (Sample s : mDequeuedSamples) {
                 mSamplePool.recycleInput(s);
             }
             mDequeuedSamples.clear();