Only propagate a decoder exception if it happens at the beginning of a stream

This commit is contained in:
Cameron Gutman 2015-06-15 10:28:09 -07:00
parent 6371d364e1
commit 0c73e3d0ae

View File

@ -134,11 +134,14 @@ public class MediaCodecDecoderRenderer extends EnhancedDecoderRenderer {
} }
} }
if (buf != null || codecFlags != 0) { // Only throw if this happens at the beginning of a stream
throw new RendererException(this, e, buf, codecFlags); if (totalFrames < 60) {
} if (buf != null || codecFlags != 0) {
else { throw new RendererException(this, e, buf, codecFlags);
throw new RendererException(this, e); }
else {
throw new RendererException(this, e);
}
} }
} }