aboutsummaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorRamiro Polla <ramiro.polla@gmail.com>2011-10-08 15:00:00 -0300
committerMichael Niedermayer <michaelni@gmx.at>2011-11-06 16:53:49 +0100
commitd3bc75c666704cfefcf7a46cb3f20ef35383b996 (patch)
tree9b67b64e14577328f9edcc550b62bfa2b598ca20 /libavdevice
parentb13ba5cb9a1a56883f0a8e7f7b02f7a1330ccb6d (diff)
downloadffmpeg-d3bc75c666704cfefcf7a46cb3f20ef35383b996.tar.gz
dshow: support BI_BITFIELDS compression type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/dshow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c
index 354e663723..bba1bbaffb 100644
--- a/libavdevice/dshow.c
+++ b/libavdevice/dshow.c
@@ -72,6 +72,7 @@ static enum PixelFormat dshow_pixfmt(DWORD biCompression, WORD biBitCount)
return PIX_FMT_YUYV422;
case MKTAG('I', '4', '2', '0'):
return PIX_FMT_YUV420P;
+ case BI_BITFIELDS:
case BI_RGB:
switch(biBitCount) { /* 1-8 are untested */
case 1:
@@ -711,7 +712,7 @@ dshow_add_device(AVFormatContext *avctx, AVFormatParameters *ap,
codec->bits_per_coded_sample = bih->biBitCount;
} else {
codec->codec_id = CODEC_ID_RAWVIDEO;
- if (bih->biCompression == BI_RGB) {
+ if (bih->biCompression == BI_RGB || bih->biCompression == BI_BITFIELDS) {
codec->bits_per_coded_sample = bih->biBitCount;
codec->extradata = av_malloc(9 + FF_INPUT_BUFFER_PADDING_SIZE);
if (codec->extradata) {