[gst-hybris] crashes when using playbin without setting a valid texture_id

Bug #1231727 reported by Ricardo Salveti
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gst-plugins-bad1.0 (Ubuntu)
Fix Released
Critical
Jim Hodapp

Bug Description

Using gstreamer1.0-hybris (1.1.4-2ubuntu4), gst crashes inside the media compat layer when trying to use playbin without setting a valid texture_id.

To reproduce:
$ apt-get install libqgsttools-p1-touch libqt5multimedia5-touch libqt5multimedia5-touch-plugins libqt5multimediaquick-p5-touch qtdeclarative5-qtmultimedia-touch-plugin qtvideonode-plugin gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad gstreamer1.0-libav gstreamer1.0-hybris
$ wget http://people.canonical.com/~jhodapp/sintel_trailer-1080p.mp4
$ gst-launch-1.0 -v playbin uri=file:///home/phablet/Videos/sintel_trailer-1080p.mp4

If you run it with debug, you'll see the SIGSEGV happens inside gstamchybris.c:135:gst_amc_codec_configure, when it calls the media_compat layer to configure the codec:
===
err = media_codec_configure (codec->codec_delegate, format->format, stc, 0);
===

Looking further at the compat layer, this happens when calling the following code (inside hybris):
===
    ALOGE("SurfaceTextureClientHybris: %p", stch);
    ALOGE("SurfaceTextureClientHybris(singleton): %p", &_SurfaceTextureClientHybris::getInstance());
    d->media_codec->configure(aformat, &_SurfaceTextureClientHybris::getInstance(), NULL, flags);
===

And it happens because when using just playbin, nobody sets up the texture_id property, and as a side effect there's none surface_texture to use.

Ideally when texture_id is not provided, the sink itself (mirsink) would need to create and provide one, otherwise the pure playbin use case (without qtmultimedia) will be broken, affecting anyone using playbin (mediascanner, qtwebkit, etc).

Changed in gst-plugins-bad1.0 (Ubuntu):
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Jim Hodapp (jhodapp)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

What's the use case for this scenario? I'm trying to prioritize this with some other fixes. I knew this would be broken (it wasn't always broken) in the current implementation. The fix is actually to use the platform API to get an EGLNativeWindow to pass to the SurfaceTextureClientHybris. The tricky part is figuring out exactly when to use an EGLNativeWindow or a texture id.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gst-plugins-bad1.0 - 1.1.4-2ubuntu5

---------------
gst-plugins-bad1.0 (1.1.4-2ubuntu5) saucy; urgency=low

  * adding-mirsink-and-android-media-over-hybris-support.patch:
    - Refreshing patch to allow mirsink to create a session/surface to allow
      proper rendering with playbin (without giving a texture id)
      (LP: #1231727)
  * debian/control: adding libplatform-api1-dev as build-dep for i386 and
    armhf, as it's only relevant for the mirsink
 -- Ricardo Salveti de Araujo <email address hidden> Fri, 27 Sep 2013 13:42:09 -0300

Changed in gst-plugins-bad1.0 (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.