Remove useless processing for non-raw formats

This commit is contained in:
Edward Hervey 2009-01-26 10:33:55 +01:00
parent b2f17781ac
commit 35848f66d8

View file

@ -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 */
}