Commit 483e9d8a authored by Derek Buitenhuis's avatar Derek Buitenhuis

Merge commit 'ec8a69fa'

* commit 'ec8a69fa':
  screenpresso: Correctly handle keyframes
Merged-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parents 5d31074d ec8a69fa
......@@ -115,10 +115,9 @@ static int screenpresso_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}
/* Basic sanity check, but not really harmful */
if (avpkt->data[0] != 0x73 && avpkt->data[0] != 0x72)
av_log(avctx, AV_LOG_WARNING, "Unknown header 0x%02X\n", avpkt->data[0]);
keyframe = (avpkt->data[0] == 0x73);
/* Compression level (4 bits) and keyframe information (1 bit) */
av_log(avctx, AV_LOG_DEBUG, "Compression level %d\n", avpkt->data[0] >> 4);
keyframe = avpkt->data[0] & 1;
/* Pixel size */
component_size = ((avpkt->data[1] >> 2) & 0x03) + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment