code: @Override
      public boolean addData(IoBuffer data) {
          if (data.limit() == 0) {
              return true;
          }
          if (!this.canHandleData(data)) {
              return false;
          }
          byte first = data.get();
          //log.trace("First byte: {}", HexDump.toHexString(first));
          data.rewind();
          // get frame type
          int frameType = (first & MASK_VIDEO_FRAMETYPE) >> 4;
          if (frameType != FLAG_FRAMETYPE_KEYFRAME) {
              // Not a keyframe
              try {
                  int lastInterframe = numInterframes.getAndIncrement();
                  if (frameType != FLAG_FRAMETYPE_DISPOSABLE) {
                      log.trace("Buffering interframe #{}", lastInterframe);
                      if (lastInterframe < interframes.size()) {
                          interframes.get(lastInterframe).setData(data);
                      } else {
                          interframes.add(new FrameData(data));
                      }
                  } else {
                      numInterframes.set(lastInterframe);
                  }
              } catch (Throwable e) {
                  log.error("Failed to buffer interframe", e);
              }
              data.rewind();
              return true;
          }
          numInterframes.set(0);
          interframes.clear();
          // Store last keyframe
          dataCount = data.limit();
          if (blockSize < dataCount) {
              blockSize = dataCount;
              blockData = new byte[blockSize];
          }
          data.get(blockData, 0, dataCount);
          data.rewind();
          return true;
      }
docs: {@inheritDoc}