diff options
author | Dirk Van Haerenborgh <vhdirk@gmail.com> | 2013-03-10 09:07:17 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2013-03-11 14:23:05 +0100 |
commit | e8ca0528a9b2c9c255b25b9d822f97f24bf24879 (patch) | |
tree | 05ca9b23324ef64e18b1d865ff280c7e6398fb68 | |
parent | c62df3adaab7f1a1025d470acdd083c666e4975b (diff) |
riff: never create caps with negative height
https://bugzilla.gnome.org/show_bug.cgi?id=695540
-rw-r--r-- | gst-libs/gst/riff/riff-media.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gst-libs/gst/riff/riff-media.c b/gst-libs/gst/riff/riff-media.c index ef56090d2..562733415 100644 --- a/gst-libs/gst/riff/riff-media.c +++ b/gst-libs/gst/riff/riff-media.c @@ -892,9 +892,11 @@ gst_riff_create_video_caps (guint32 codec_fcc, } if (strf != NULL) { + /* raw rgb data is stored topdown, but instead of inverting the buffer, */ + /* some tools just negate the height field in the header (e.g. ffmpeg) */ gst_caps_set_simple (caps, "width", G_TYPE_INT, strf->width, - "height", G_TYPE_INT, strf->height, NULL); + "height", G_TYPE_INT, ABS ((gint) strf->height), NULL); } else { gst_caps_set_simple (caps, "width", GST_TYPE_INT_RANGE, 1, G_MAXINT, |