[Bug 731400] pnmdec: PNMDecoder gives sticky event warning
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Jun 10 06:54:18 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=731400
GStreamer | gst-plugins-bad | unspecified
--- Comment #6 from Thiago Sousa Santos <thiagossantos at gmail.com> 2014-06-10 13:54:17 UTC ---
Review of attachment 278196:
--> (https://bugzilla.gnome.org/review?bug=731400&attachment=278196)
Did a second review with the ascii scenario in consideration.
::: gst/pnm/gstpnmdec.c
@@ +255,3 @@
+ if (size < 8)
+ goto need_more_data;
+ data = gst_adapter_take_buffer (adapter, size);
The problem with using take_buffer will remove data from the adapter and then
later when you call _add_to_frame it won't be adding the same data you
inspected. Use the _map to avoid this.
@@ +312,3 @@
+ } else {
+ gst_pnmdec_add_to_frame (s, data);
+ }
The procedure above still holds, even if it is still ascii. When ascii, you can
go doing your conversion to the binary format while parsing and storing it to a
instance variable, but you should still do the _add_to_frame of the data that
you already parsed.
The difference is that when you get your handle_frame called you shouldn't use
the input buffer but the buffer that you have already assembled internally (for
ascii converted data).
Please add a comment for the different handling of ascii input for future
readers.
--
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