I\'m trying to figure out how to use Android\'s MediaCodec class to decode H.264 video. To start, I\'m trying to manually parse the NAL units out of an H.264 file and feed them
AFAIK you need to take the header out as well as feed it with SPS/PSS as first buffers, But getting -1 is not a big deal it will be a normal behaivour. Some devices will crash if they are not feeded by SPS/PPS before the other NALs