[Bug 785085] multiple vaapi encoding pipelines on radeonsi segfault

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jul 27 08:43:12 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=785085

--- Comment #16 from Víctor Manuel Jáquez Leal <vjaquez at igalia.com> ---
(In reply to Tomas Rataj from comment #15)
> static void
> append_formats (GArray * formats, const VAImageFormat * va_formats,
>     guint * flags, guint n)
> {
>   GstVideoFormat format;
>   int YV12_idx = -1;
>   int I420_idx = -1;
>   const GstVaapiFormatInfo *fip;
>   guint i;
> 
>   for (i = 0; i < n; i++) {
>     const VAImageFormat *const va_format = &va_formats[i];
> 
>     format = gst_vaapi_video_format_from_va_format (va_format);
>     if (format == GST_VIDEO_FORMAT_UNKNOWN) {
>       GST_DEBUG ("unsupported format %" GST_FOURCC_FORMAT,
>           GST_FOURCC_ARGS (va_format->fourcc));
>       continue;
>     }
>     append_format (formats, format, flags ? flags[i] : 0);
> 
>     switch (format) {
>       case GST_VIDEO_FORMAT_YV12:
>         YV12_idx = formats->len - 1;
>         break;
>       case GST_VIDEO_FORMAT_I420:
>         I420_idx = formats->len - 1;
>         break;
>       default:
>         break;
>     }
>   }
> 
>   /* Append I420 (resp. YV12) format if YV12 (resp. I420) is not
>      supported by the underlying driver */
>   if ((YV12_idx != -1) && (I420_idx == -1)) {
>     fip = &g_array_index(formats, GstVaapiFormatInfo,YV12_idx);
>     append_format (formats, GST_VIDEO_FORMAT_I420, fip->flags);
>   } else if ((I420_idx != -1) && (YV12_idx == -1)) {
>     fip = &g_array_index(formats, GstVaapiFormatInfo,I420_idx);
>     append_format (formats, GST_VIDEO_FORMAT_YV12, fip->flags);
>   }

Your proposal looks sensible. Can you provide a patch?

Thanks.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list