aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJason Garrett-Glaser <darkshikari@gmail.com>2009-06-12 17:39:56 +0000
committerJason Garrett-Glaser <darkshikari@gmail.com>2009-06-12 17:39:56 +0000
commitfc3fc0293d78c6ca61aba775c08266ad96240d5b (patch)
tree3ab213339ef54a12f247b1560f02ab2c622adeb8 /libavcodec
parentc0e9b2e84fecbc4cc8efb78ced8fd1eaafae7a9d (diff)
downloadffmpeg-fc3fc0293d78c6ca61aba775c08266ad96240d5b.tar.gz
Add new FOURCC (0x0003) for raw DIB video, set flip flag accordingly.
Fixes a few AVI files from what is probably a mobile phone video camera. Originally committed as revision 19172 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/raw.c1
-rw-r--r--libavcodec/rawdec.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/raw.c b/libavcodec/raw.c
index c0cc56dd80..1f60477aef 100644
--- a/libavcodec/raw.c
+++ b/libavcodec/raw.c
@@ -48,6 +48,7 @@ const PixelFormatTag ff_raw_pixelFormatTags[] = {
{ PIX_FMT_BGR555, MKTAG('B', 'G', 'R', 15) },
{ PIX_FMT_RGB565, MKTAG('R', 'G', 'B', 16) },
{ PIX_FMT_BGR565, MKTAG('B', 'G', 'R', 16) },
+ { PIX_FMT_RGB565, MKTAG( 3 , 0 , 0 , 0 ) },
/* quicktime */
{ PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') },
diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 89e9ea936b..2f29271c9a 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -87,7 +87,8 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
if (!context->buffer)
return -1;
- if(avctx->extradata_size >= 9 && !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9))
+ if((avctx->extradata_size >= 9 && !memcmp(avctx->extradata + avctx->extradata_size - 9, "BottomUp", 9)) ||
+ avctx->codec_tag == MKTAG( 3 , 0 , 0 , 0 ))
context->flip=1;
return 0;