mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 09:08:14 +00:00
Remove useless processing for non-raw formats
This commit is contained in:
parent
b2f17781ac
commit
35848f66d8
1 changed files with 8 additions and 10 deletions
|
@ -3583,16 +3583,11 @@ swap_line (guint8 * d1, guint8 * d2, guint8 * tmp, gint bytes)
|
|||
memcpy (d2, tmp, bytes);
|
||||
}
|
||||
|
||||
/*
|
||||
* Helper for gst_avi_demux_insert()
|
||||
*/
|
||||
static gboolean
|
||||
gst_avi_demux_is_uncompressed (guint32 fourcc)
|
||||
{
|
||||
return fourcc == GST_RIFF_DIB ||
|
||||
fourcc == GST_RIFF_rgb ||
|
||||
fourcc == GST_RIFF_RGB || fourcc == GST_RIFF_RAW;
|
||||
}
|
||||
|
||||
#define gst_avi_demux_is_uncompressed(fourcc) \
|
||||
(fourcc == GST_RIFF_DIB || \
|
||||
fourcc == GST_RIFF_rgb || \
|
||||
fourcc == GST_RIFF_RGB || fourcc == GST_RIFF_RAW)
|
||||
|
||||
/*
|
||||
* Invert DIB buffers... Takes existing buffer and
|
||||
|
@ -3608,6 +3603,9 @@ gst_avi_demux_invert (avi_stream_context * stream, GstBuffer * buf)
|
|||
gint bpp, stride;
|
||||
guint8 *tmp = NULL;
|
||||
|
||||
if (stream->strh->type != GST_RIFF_FCC_vids)
|
||||
return buf;
|
||||
|
||||
if (!gst_avi_demux_is_uncompressed (stream->strh->fcc_handler)) {
|
||||
return buf; /* Ignore non DIB buffers */
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue