Decode H264 Raw Stream Using Mediacodec
I recieve h264 data from server, I want to decode this stream using mediacodec and texture view on android.I got the data from the server , parssing it to get the SPS , the PPS an
Solution 1:
sorry I can't comment, but I see some probable mistakes in your code :
- Your KEY_MAX_INPUT_SIZE is wrong, it must be at least your Height * Width, in your case the Height * Width = 1920 * 1080 = 2073600 > 100000, you feed your decoder input buffer with data that can be > 100000, so since the decoder wants NALUs it probably wouldn't like it.
- You do not clear input buffer before pushing data (realy needed?)
Post a Comment for "Decode H264 Raw Stream Using Mediacodec"