From 0894b9405c0cdb7cbf1cd80092a4d9f3766b4e66 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Oct 2014 23:20:21 +0100 Subject: [PATCH] avformat/bethsoftvid: print error in case the side date failed to be allocated Signed-off-by: Michael Niedermayer --- libavformat/bethsoftvid.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/bethsoftvid.c b/libavformat/bethsoftvid.c index c98ff14df1..05f5c4f822 100644 --- a/libavformat/bethsoftvid.c +++ b/libavformat/bethsoftvid.c @@ -194,6 +194,9 @@ static int read_frame(BVID_DemuxContext *vid, AVIOContext *pb, AVPacket *pkt, BVID_PALETTE_SIZE); if (pdata) memcpy(pdata, vid->palette, BVID_PALETTE_SIZE); + else + av_log(s, AV_LOG_ERROR, "Failed to allocate palette side data\n"); + av_freep(&vid->palette); }