diff options
author | Stefan Kost <ensonic@users.sf.net> | 2009-10-08 18:08:22 +0300 |
---|---|---|
committer | Stefan Kost <ensonic@users.sf.net> | 2009-10-08 18:10:08 +0300 |
commit | e81303b733b170bd1f8e219f0ab045b28b9804d1 (patch) | |
tree | 0cd89859a977c39f393f6c11772d620a54164fd6 | |
parent | f2d1c9b0b78910f3ba9e1d9f17ba09914fb27e31 (diff) |
ffmpegcolorspace: chwck formats just once per _chain()
-rw-r--r-- | gst/ffmpegcolorspace/gstffmpegcolorspace.c | 4 | ||||
-rw-r--r-- | gst/ffmpegcolorspace/imgconvert.c | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/gst/ffmpegcolorspace/gstffmpegcolorspace.c b/gst/ffmpegcolorspace/gstffmpegcolorspace.c index f4f1ae88b..7045f2968 100644 --- a/gst/ffmpegcolorspace/gstffmpegcolorspace.c +++ b/gst/ffmpegcolorspace/gstffmpegcolorspace.c @@ -439,7 +439,9 @@ gst_ffmpegcsp_transform (GstBaseTransform * btrans, GstBuffer * inbuf, space = GST_FFMPEGCSP (btrans); GST_DEBUG ("from %d -> to %d", space->from_pixfmt, space->to_pixfmt); - if (space->from_pixfmt == PIX_FMT_NB || space->to_pixfmt == PIX_FMT_NB) + + if (G_UNLIKELY (space->from_pixfmt == PIX_FMT_NB || + space->to_pixfmt == PIX_FMT_NB)) goto unknown_format; /* fill from with source data */ diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index 9af38f364..2e3915503 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -2963,9 +2963,6 @@ img_convert (AVPicture * dst, int dst_pix_fmt, ConvertEntry *ce; AVPicture tmp1, *tmp = &tmp1; - if (G_UNLIKELY (src_pix_fmt < 0 || src_pix_fmt >= PIX_FMT_NB || - dst_pix_fmt < 0 || dst_pix_fmt >= PIX_FMT_NB)) - return -1; if (G_UNLIKELY (src_width <= 0 || src_height <= 0)) return 0; |