diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2018-09-18 00:16:42 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2018-09-19 18:13:46 +0200 |
commit | 1ba32a3c464a37beeb0943a630d5905d84d61b32 (patch) | |
tree | 3f0087ad24f5e062635490553f14a76fb428afdb | |
parent | 26902f2ef0dc7b65992228767b8adba46e7a6d48 (diff) | |
download | ffmpeg-1ba32a3c464a37beeb0943a630d5905d84d61b32.tar.gz |
lavd/dshow: Interpret negative height as bottom-down frame.
Fixes ticket #7436.
-rw-r--r-- | libavdevice/dshow.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index de910c0994..757f7a515d 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -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 { |