mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-23 14:36:24 +00:00
avi_ fix invert function
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686550
This commit is contained in:
parent
0e3ef30c31
commit
a2eead3d60
1 changed files with 1 additions and 12 deletions
|
@ -4514,12 +4514,10 @@ swap_line (guint8 * d1, guint8 * d2, guint8 * tmp, gint bytes)
|
|||
static GstBuffer *
|
||||
gst_avi_demux_invert (GstAviStream * stream, GstBuffer * buf)
|
||||
{
|
||||
GstStructure *s;
|
||||
gint y, w, h;
|
||||
gint bpp, stride;
|
||||
guint8 *tmp = NULL;
|
||||
GstMapInfo map;
|
||||
GstCaps *caps;
|
||||
guint32 fourcc;
|
||||
|
||||
if (stream->strh->type != GST_RIFF_FCC_vids)
|
||||
|
@ -4536,19 +4534,10 @@ gst_avi_demux_invert (GstAviStream * stream, GstBuffer * buf)
|
|||
return buf; /* Ignore non DIB buffers */
|
||||
}
|
||||
|
||||
caps = gst_pad_get_current_caps (stream->pad);
|
||||
s = gst_caps_get_structure (caps, 0);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
if (stream->rgb8_palette != NULL) {
|
||||
bpp = 8;
|
||||
} else if (!gst_structure_get_int (s, "bpp", &bpp)) { /* FIXME */
|
||||
GST_WARNING ("Failed to retrieve depth from caps");
|
||||
return buf;
|
||||
}
|
||||
|
||||
h = stream->strf.vids->height;
|
||||
w = stream->strf.vids->width;
|
||||
bpp = stream->strf.vids->bit_cnt ? stream->strf.vids->bit_cnt : 8;
|
||||
stride = GST_ROUND_UP_4 (w * (bpp / 8));
|
||||
|
||||
buf = gst_buffer_make_writable (buf);
|
||||
|
|
Loading…
Reference in a new issue