diff options
author | Edward Hervey <bilboed@bilboed.com> | 2009-01-26 10:33:55 +0100 |
---|---|---|
committer | Edward Hervey <bilboed@bilboed.com> | 2009-01-30 17:01:30 +0100 |
commit | 35848f66d8c642d28599113619a66503366edd0f (patch) | |
tree | f9ce510fa3c4382a4ed26ead0331395ef369974a | |
parent | b2f17781ac188111c95528fd8250883fd1ca6183 (diff) |
Remove useless processing for non-raw formats
-rw-r--r-- | gst/avi/gstavidemux.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/gst/avi/gstavidemux.c b/gst/avi/gstavidemux.c index cf7b0c12..7a3166cf 100644 --- a/gst/avi/gstavidemux.c +++ b/gst/avi/gstavidemux.c @@ -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 */ } |