summaryrefslogtreecommitdiff
path: root/ffmpeg/libavcodec/bmp.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/bmp.c
parentb7a5a477b8ff4d4e3028b9dfb9a9df0a41463f92 (diff)
basic type mechanism working
Diffstat (limited to 'ffmpeg/libavcodec/bmp.c')
-rw-r--r--ffmpeg/libavcodec/bmp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ffmpeg/libavcodec/bmp.c b/ffmpeg/libavcodec/bmp.c
index a3bb1a7..404c47d 100644
--- a/ffmpeg/libavcodec/bmp.c
+++ b/ffmpeg/libavcodec/bmp.c
@@ -244,7 +244,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
// OS/2 bitmap, 3 bytes per palette entry
if ((hsize-ihsize-14) < (colors << 2)) {
if ((hsize-ihsize-14) < colors * 3) {
- av_log(avctx, AV_LOG_ERROR, "palette doesnt fit in packet\n");
+ av_log(avctx, AV_LOG_ERROR, "palette doesn't fit in packet\n");
return AVERROR_INVALIDDATA;
}
for (i = 0; i < colors; i++)
@@ -256,7 +256,7 @@ static int bmp_decode_frame(AVCodecContext *avctx,
buf = buf0 + hsize;
}
if (comp == BMP_RLE4 || comp == BMP_RLE8) {
- if (height < 0) {
+ if (comp == BMP_RLE8 && height < 0) {
p->data[0] += p->linesize[0] * (avctx->height - 1);
p->linesize[0] = -p->linesize[0];
}
@@ -330,9 +330,9 @@ static int bmp_decode_frame(AVCodecContext *avctx,
AVCodec ff_bmp_decoder = {
.name = "bmp",
+ .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_BMP,
.decode = bmp_decode_frame,
.capabilities = CODEC_CAP_DR1,
- .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
};