]> git.sesse.net Git - ffmpeg/commitdiff
dshow: support BI_BITFIELDS compression type
authorRamiro Polla <ramiro.polla@gmail.com>
Sat, 8 Oct 2011 18:00:00 +0000 (15:00 -0300)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 6 Nov 2011 15:53:49 +0000 (16:53 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/dshow.c

index 354e66372351bd7015d8412bdd10af47c0c64ab3..bba1bbaffbad88ef58d10b2b1ab47c9647c62b3b 100644 (file)
@@ -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) {