Browse Source

lavd/dshow: Interpret negative height as bottom-down frame.

Fixes ticket #7436.
tags/n4.1
Carl Eugen Hoyos 7 years ago
parent
commit
1ba32a3c46
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      libavdevice/dshow.c

+ 4
- 0
libavdevice/dshow.c View File

@@ -996,11 +996,15 @@ dshow_add_device(AVFormatContext *avctx,
par->codec_id = AV_CODEC_ID_RAWVIDEO;
if (bih->biCompression == BI_RGB || bih->biCompression == BI_BITFIELDS) {
par->bits_per_coded_sample = bih->biBitCount;
if (par->height < 0) {
par->height *= -1;
} else {
par->extradata = av_malloc(9 + AV_INPUT_BUFFER_PADDING_SIZE);
if (par->extradata) {
par->extradata_size = 9;
memcpy(par->extradata, "BottomUp", 9);
}
}
}
}
} else {


Loading…
Cancel
Save