public final FrameInfo decodeFrame(boolean skip, boolean force) throws IOException {
        //Log.d(TAG, "decodeFrame");
        while(!mOutputEos) {
            // Dequeue decoded frames
            FrameInfo frameInfo = dequeueDecodedFrame();

            // Enqueue encoded buffers into decoders
            while (queueSampleToCodec(skip)) {}

            if(frameInfo != null) {
                // If a frame has been decoded, return it
                return frameInfo;
            }

            if(!force) {
                // If we have not decoded a frame and we're not forcing decoding until a frame becomes available, return null
                return null;
            }
        }

        Log.d(TAG, "EOS NULL");
        return null; // EOS already reached, no frame left to return
    }
Runs the decoder loop, optionally until a new frame is available.
The returned FrameInfo object keeps metadata of the decoded frame. To release its data,
call {@link #releaseFrame(FrameInfo)}.

@param skip skip frames of other tracks
@param force force decoding in a loop until a frame becomes available or the EOS is reached
@return a FrameInfo object holding metadata of a decoded frame or NULL if no frame has been decoded
MediaPlayer/src/main/java/net/protyposis/android/mediaplayer/MediaCodecDecoder.java