summaryrefslogtreecommitdiff
path: root/libavformat/ipmovie.c
diff options
context:
space:
mode:
authorKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 08:21:40 +0000
committerKostya Shishkov <kostya.shishkov@gmail.com>2009-12-27 08:21:40 +0000
commit8badb23e2264caab249dc2758f0bd0a43f423a96 (patch)
tree75f467e43f5c362654d2913145f7d74e91c3f463 /libavformat/ipmovie.c
parent9156a5ad72e989e0fa2735741edf894fffad33b9 (diff)
Recognize 16-bit Interplay Video variant
Originally committed as revision 20927 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/ipmovie.c')
-rw-r--r--libavformat/ipmovie.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/libavformat/ipmovie.c b/libavformat/ipmovie.c
index c9b506a3ef..bf62ee64ce 100644
--- a/libavformat/ipmovie.c
+++ b/libavformat/ipmovie.c
@@ -93,6 +93,7 @@ typedef struct IPMVEContext {
uint64_t frame_pts_inc;
+ unsigned int video_bpp;
unsigned int video_width;
unsigned int video_height;
int64_t video_pts;
@@ -375,6 +376,11 @@ static int process_ipmovie_chunk(IPMVEContext *s, ByteIOContext *pb,
}
s->video_width = AV_RL16(&scratch[0]) * 8;
s->video_height = AV_RL16(&scratch[2]) * 8;
+ if (opcode_version < 2 || !AV_RL16(&scratch[6])) {
+ s->video_bpp = 8;
+ } else {
+ s->video_bpp = 16;
+ }
debug_ipmovie("video resolution: %d x %d\n",
s->video_width, s->video_height);
break;
@@ -565,6 +571,7 @@ static int ipmovie_read_header(AVFormatContext *s,
st->codec->codec_tag = 0; /* no fourcc */
st->codec->width = ipmovie->video_width;
st->codec->height = ipmovie->video_height;
+ st->codec->bits_per_coded_sample = ipmovie->video_bpp;
/* palette considerations */
st->codec->palctrl = &ipmovie->palette_control;