lavd/dshow: Interpret negative height as bottom-down frame.
Fixes ticket #7436.
This commit is contained in:
@@ -996,6 +996,9 @@ dshow_add_device(AVFormatContext *avctx,
|
|||||||
par->codec_id = AV_CODEC_ID_RAWVIDEO;
|
par->codec_id = AV_CODEC_ID_RAWVIDEO;
|
||||||
if (bih->biCompression == BI_RGB || bih->biCompression == BI_BITFIELDS) {
|
if (bih->biCompression == BI_RGB || bih->biCompression == BI_BITFIELDS) {
|
||||||
par->bits_per_coded_sample = bih->biBitCount;
|
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);
|
par->extradata = av_malloc(9 + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
if (par->extradata) {
|
if (par->extradata) {
|
||||||
par->extradata_size = 9;
|
par->extradata_size = 9;
|
||||||
@@ -1003,6 +1006,7 @@ dshow_add_device(AVFormatContext *avctx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
WAVEFORMATEX *fx = NULL;
|
WAVEFORMATEX *fx = NULL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user