After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 163333 - [pngenc] Remove the buffer == file assumption
[pngenc] Remove the buffer == file assumption
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins
git master
Other Linux
: Normal enhancement
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-01-08 14:09 UTC by Gergely Nagy
Modified: 2005-08-29 15:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to resolve the problem (7.89 KB, patch)
2005-01-08 14:21 UTC, Gergely Nagy
none Details | Review

Description Gergely Nagy 2005-01-08 14:09:02 UTC
Right now pngenc assumes that the buffer is preciesly equal to the whole data it
must process. That breaks spectacularly when using something like this:

gst-launch filesrc location=test.raw !
video/x-raw-rgb,depth=(int)32,bpp=(int)32,width=(int)48,height=(int)48 ! pngenc
! filesink location=out.png

In my tests, out.png contained only a part of the input data (the first 1024
bytes encoded into png, which is no suprise).

Attached will be a patch that removes this assumption.
Comment 1 Gergely Nagy 2005-01-08 14:21:34 UTC
Created attachment 35659 [details] [review]
Patch to resolve the problem

This patch makes pngenc store its incoming buffers until the whole image
arrives, and then doing the compression.

Apart from this, a few memory leaks are plugged by this patch, and the filters
behaviour on errors from libpng is improved (in some sense at least.. now it
uses GST_ELEMENT_ERROR, before it only issued a warning, which might have lead
to interesting results).

The patch should be applied on top of the patch I submitted to bug#163323
(compression level customisation support for pngenc).

If needed, I can provide a patch that does not depend on that other one.