[FFmpeg-cvslog] lavd/dshow: Interpret negative height as bottom-down frame.

Carl Eugen Hoyos git at videolan.org
Wed Sep 19 19:15:06 EEST 2018


ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Tue Sep 18 00:16:42 2018 +0200| [1ba32a3c464a37beeb0943a630d5905d84d61b32] | committer: Carl Eugen Hoyos

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

Fixes ticket #7436.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1ba32a3c464a37beeb0943a630d5905d84d61b32
---

 libavdevice/dshow.c | 4 ++++
 1 file changed, 4 insertions(+)

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 {



More information about the ffmpeg-cvslog mailing list