[Bug 729764] pnmdec: Not possible to get output buffer with the same dimension as encoded size

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Tue May 13 16:39:03 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=729764
  GStreamer | gst-plugins-bad | git

Thiago Sousa Santos <thiagossantos> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #276118|none                        |needs-work
             status|                            |

--- Comment #2 from Thiago Sousa Santos <thiagossantos at gmail.com> 2014-05-13 23:38:56 UTC ---
Review of attachment 276118:
 --> (https://bugzilla.gnome.org/review?bug=729764&attachment=276118)

While this patch doesn't address an issue, there is room for improvement here
in pnmdec. What needs to be done is check if downstream has a 'rowstride' field
in its caps and use that. Otherwise just use rowstride = width.

Another thing I noticed is that it is using buffer appends until it gets a full
frame, it would be more resilient if it used a GstAdapter and only retrieved a
buffer of an expected size.

::: gst/pnm/gstpnmdec.c
@@ +106,3 @@
 {
   /* Need to convert from PNM rowstride to GStreamer rowstride */
+  if ((s->mngr.info.width % 4 != 0) && (s->dimension == FALSE)) {

This is actually only increasing the image to have a rowstride that is a
multiple of 4. The final buffer caps is still of the input width and should
work as expected.

I don't think we have a restriction of having a multiple of 4 rowstride, it
should actually be respecting whatever downstream can do if it provides a
rowstride value in the caps.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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