Log decoding problems

This commit is contained in:
Iwan Timmer 2014-09-20 16:42:41 +02:00
parent 799dae64c2
commit e3b897e423
2 changed files with 16 additions and 4 deletions

View File

@ -1,5 +1,6 @@
package com.limelight.binding.video; package com.limelight.binding.video;
import com.limelight.LimeLog;
import com.limelight.nvstream.av.ByteBufferDescriptor; import com.limelight.nvstream.av.ByteBufferDescriptor;
import com.limelight.nvstream.av.DecodeUnit; import com.limelight.nvstream.av.DecodeUnit;
@ -28,8 +29,13 @@ public class ImxDecoderRenderer extends AbstractVideoRenderer {
boolean ok = true; boolean ok = true;
for (int i=0;i<units.size();i++) { for (int i=0;i<units.size();i++) {
ByteBufferDescriptor bbd = units.get(i); ByteBufferDescriptor bbd = units.get(i);
if (ok) if (ok) {
ok = (ImxDecoder.decode(bbd.data, bbd.offset, bbd.length, i == (units.size()-1)) == 0); int ret = ImxDecoder.decode(bbd.data, bbd.offset, bbd.length, i == (units.size()-1));
if (ret != 0) {
LimeLog.severe("Error code during decode: " + ret);
ok = false;
}
}
} }
} }
} }

View File

@ -1,5 +1,6 @@
package com.limelight.binding.video; package com.limelight.binding.video;
import com.limelight.LimeLog;
import com.limelight.nvstream.av.ByteBufferDescriptor; import com.limelight.nvstream.av.ByteBufferDescriptor;
import com.limelight.nvstream.av.DecodeUnit; import com.limelight.nvstream.av.DecodeUnit;
@ -47,8 +48,13 @@ public class OmxDecoderRenderer extends AbstractVideoRenderer {
boolean ok = true; boolean ok = true;
for (int i=0;i<units.size();i++) { for (int i=0;i<units.size();i++) {
ByteBufferDescriptor bbd = units.get(i); ByteBufferDescriptor bbd = units.get(i);
if (ok) if (ok) {
ok = (OmxDecoder.decode(bbd.data, bbd.offset, bbd.length, i == (units.size()-1)) == 0); int ret = ImxDecoder.decode(bbd.data, bbd.offset, bbd.length, i == (units.size()-1));
if (ret != 0) {
LimeLog.severe("Error code during decode: " + ret);
ok = false;
}
}
} }
} }