On 25/09/15 04:17, Vittorio Giovara wrote:
> Signed-off-by: Vittorio Giovara <[email protected]>
> ---
> +static int screenpresso_decode_frame(AVCodecContext *avctx, void *data,
> + int *got_frame, AVPacket *avpkt)
> +{
Add a avpkt->size > 3 check.
> + ScreenpressoContext *ctx = avctx->priv_data;
> + AVFrame *frame = data;
> + int keyframe = (avpkt->data[0] == 0x73);
> + int ret;
> +
> + /* Basic sanity check, but not really harmful */
> + if ((avpkt->data[0] != 0x73 && avpkt->data[0] != 0x72) ||
> + avpkt->data[1] != 8) { // bpp probably
> + av_log(avctx, AV_LOG_WARNING, "Unknown header 0x%02X%02X\n",
> + avpkt->data[0], avpkt->data[1]);
> + }
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel