Commit e81303b7 authored by Stefan Kost's avatar Stefan Kost
Browse files

ffmpegcolorspace: chwck formats just once per _chain()

parent f2d1c9b0
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment