mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-07 11:12:17 +00:00
ext/libpng/gstpngenc.c: Don't flush downstream after every buffer - that's not what this libpng callback is for at all!
Original commit message from CVS: * ext/libpng/gstpngenc.c: Don't flush downstream after every buffer - that's not what this libpng callback is for at all!
This commit is contained in:
parent
2e0d8e8b93
commit
006861f235
2 changed files with 7 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2008-11-20 Jan Schmidt <jan.schmidt@sun.com>
|
||||||
|
|
||||||
|
* ext/libpng/gstpngenc.c:
|
||||||
|
Don't flush downstream after every buffer - that's not what
|
||||||
|
this libpng callback is for at all!
|
||||||
|
|
||||||
2008-11-17 Tim-Philipp Müller <tim.muller at collabora co uk>
|
2008-11-17 Tim-Philipp Müller <tim.muller at collabora co uk>
|
||||||
|
|
||||||
* sys/v4l2/v4l2src_calls.c:
|
* sys/v4l2/v4l2src_calls.c:
|
||||||
|
|
|
@ -208,17 +208,10 @@ gst_pngenc_init (GstPngEnc * pngenc, GstPngEncClass * g_class)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
user_flush_data (png_structp png_ptr)
|
user_flush_data (png_structp png_ptr G_GNUC_UNUSED)
|
||||||
{
|
{
|
||||||
GstPngEnc *pngenc;
|
|
||||||
|
|
||||||
pngenc = (GstPngEnc *) png_get_io_ptr (png_ptr);
|
|
||||||
|
|
||||||
gst_pad_push_event (pngenc->srcpad, gst_event_new_flush_start ());
|
|
||||||
gst_pad_push_event (pngenc->srcpad, gst_event_new_flush_stop ());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
user_write_data (png_structp png_ptr, png_bytep data, png_uint_32 length)
|
user_write_data (png_structp png_ptr, png_bytep data, png_uint_32 length)
|
||||||
{
|
{
|
||||||
|
@ -313,8 +306,6 @@ gst_pngenc_chain (GstPad * pad, GstBuffer * buf)
|
||||||
png_write_image (pngenc->png_struct_ptr, row_pointers);
|
png_write_image (pngenc->png_struct_ptr, row_pointers);
|
||||||
png_write_end (pngenc->png_struct_ptr, NULL);
|
png_write_end (pngenc->png_struct_ptr, NULL);
|
||||||
|
|
||||||
user_flush_data (pngenc->png_struct_ptr);
|
|
||||||
|
|
||||||
encoded_buf = gst_buffer_create_sub (pngenc->buffer_out, 0, pngenc->written);
|
encoded_buf = gst_buffer_create_sub (pngenc->buffer_out, 0, pngenc->written);
|
||||||
|
|
||||||
png_destroy_info_struct (pngenc->png_struct_ptr, &pngenc->png_info_ptr);
|
png_destroy_info_struct (pngenc->png_struct_ptr, &pngenc->png_info_ptr);
|
||||||
|
|
Loading…
Reference in a new issue