Mercurial > libavformat.hg
changeset 5475:c47a84f46ae2 libavformat
Recognize 16-bit Interplay Video variant
author | kostya |
---|---|
date | Sun, 27 Dec 2009 08:21:40 +0000 |
parents | ff40a9607f5b |
children | 770a7de45356 |
files | ipmovie.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ipmovie.c Sat Dec 26 10:59:56 2009 +0000 +++ b/ipmovie.c Sun Dec 27 08:21:40 2009 +0000 @@ -93,6 +93,7 @@ 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 @@ } 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 @@ 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;