Skip to content

Commit

Permalink
moved ff_get_buffer, added description
Browse files Browse the repository at this point in the history
  • Loading branch information
adl1995 committed Mar 4, 2017
1 parent 23d7fae commit de437d4
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6,766 deletions.
7 changes: 7 additions & 0 deletions libavcodec/codec_desc.c
Expand Up @@ -1590,6 +1590,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
.long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"),
.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
},
{
.id = AV_CODEC_ID_XPM,
.type = AVMEDIA_TYPE_VIDEO,
.name = "xpm",
.long_name = NULL_IF_CONFIG_SMALL("XPM (X PixMap) image"),
.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSLESS,
},
{
.id = AV_CODEC_ID_XWD,
.type = AVMEDIA_TYPE_VIDEO,
Expand Down
5 changes: 3 additions & 2 deletions libavcodec/xpmdec.c
Expand Up @@ -75,6 +75,9 @@ static int xpm_decode_frame(AVCodecContext *avctx, void *data,
return AVERROR_INVALIDDATA;
}

if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;

/*
string parsed_data;
for (int i = 0; i < sizeof(ptr)/sizeof(uint8_t); ++i)
Expand Down Expand Up @@ -167,8 +170,6 @@ static int xpm_decode_frame(AVCodecContext *avctx, void *data,
ptr += strcspn(ptr, ",") + 1;
}

if ((ret = ff_get_buffer(avctx, p, 0)) < 0)
return ret;


p->key_frame = 1;
Expand Down

0 comments on commit de437d4

Please sign in to comment.