mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 06:58:56 +00:00
ffmpegcolorspace: chwck formats just once per _chain()
This commit is contained in:
parent
f2d1c9b0b7
commit
e81303b733
2 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue