summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/bfi.c
diff options
context:
space:
mode:
authorTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
committerTim Redfern <tim@eclectronics.org>2013-12-29 12:19:38 +0000
commitf7813a5324be39d13ab536c245d15dfc602a7849 (patch)
treefad99148b88823d34a5df2f0a25881a002eb291b /ffmpeg/libavcodec/bfi.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/bfi.c')
-rw-r--r--ffmpeg/libavcodec/bfi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ffmpeg/libavcodec/bfi.c b/ffmpeg/libavcodec/bfi.c
index 9cfcd14..c7ac378 100644
--- a/ffmpeg/libavcodec/bfi.c
+++ b/ffmpeg/libavcodec/bfi.c
@@ -42,6 +42,8 @@ static av_cold int bfi_decode_init(AVCodecContext *avctx)
BFIContext *bfi = avctx->priv_data;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
bfi->dst = av_mallocz(avctx->width * avctx->height);
+ if (!bfi->dst)
+ return AVERROR(ENOMEM);
return 0;
}
@@ -175,6 +177,7 @@ static av_cold int bfi_decode_close(AVCodecContext *avctx)
AVCodec ff_bfi_decoder = {
.name = "bfi",
+ .long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_BFI,
.priv_data_size = sizeof(BFIContext),
@@ -182,5 +185,4 @@ AVCodec ff_bfi_decoder = {
.close = bfi_decode_close,
.decode = bfi_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
};