Skip to content

Commit

Permalink
Log decoding problems
Browse files Browse the repository at this point in the history
  • Loading branch information
irtimmer committed Sep 20, 2014
1 parent 799dae6 commit e3b897e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/com/limelight/binding/video/ImxDecoderRenderer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.limelight.binding.video;

import com.limelight.LimeLog;
import com.limelight.nvstream.av.ByteBufferDescriptor;
import com.limelight.nvstream.av.DecodeUnit;

Expand Down Expand Up @@ -28,8 +29,13 @@ public void decodeUnit(DecodeUnit decodeUnit) {
boolean ok = true;
for (int i=0;i<units.size();i++) {
ByteBufferDescriptor bbd = units.get(i);
if (ok)
ok = (ImxDecoder.decode(bbd.data, bbd.offset, bbd.length, i == (units.size()-1)) == 0);
if (ok) {
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;
}
}
}
}
}
10 changes: 8 additions & 2 deletions src/com/limelight/binding/video/OmxDecoderRenderer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.limelight.binding.video;

import com.limelight.LimeLog;
import com.limelight.nvstream.av.ByteBufferDescriptor;
import com.limelight.nvstream.av.DecodeUnit;

Expand Down Expand Up @@ -47,8 +48,13 @@ public void decodeUnit(DecodeUnit decodeUnit) {
boolean ok = true;
for (int i=0;i<units.size();i++) {
ByteBufferDescriptor bbd = units.get(i);
if (ok)
ok = (OmxDecoder.decode(bbd.data, bbd.offset, bbd.length, i == (units.size()-1)) == 0);
if (ok) {
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;
}
}
}
}

Expand Down

0 comments on commit e3b897e

Please sign in to comment.