mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-12 10:25:33 +00:00
jpegenc: Don't round up size of encoded buffers
For some reason, in code dating to 2001, encoded jpeg buffers were rounded up to multiples of 4 bytes. With the added bonus that the extra bytes are unwritten, causing valgrind issues. Oops. I can't think of any reason why JPEG buffers need to be multiples of 4 bytes, so I removed the padding. There might be some code somewhere that depends on this behavior, so if this needs to be reverted, please fix the valgrind issues.
This commit is contained in:
parent
cc526d2e52
commit
2f94df8032
1 changed files with 1 additions and 2 deletions
|
@ -246,8 +246,7 @@ gst_jpegenc_term_destination (j_compress_ptr cinfo)
|
||||||
|
|
||||||
/* Trim the buffer size and push it. */
|
/* Trim the buffer size and push it. */
|
||||||
GST_BUFFER_SIZE (jpegenc->output_buffer) =
|
GST_BUFFER_SIZE (jpegenc->output_buffer) =
|
||||||
GST_ROUND_UP_4 (GST_BUFFER_SIZE (jpegenc->output_buffer) -
|
GST_BUFFER_SIZE (jpegenc->output_buffer) - jpegenc->jdest.free_in_buffer;
|
||||||
jpegenc->jdest.free_in_buffer);
|
|
||||||
|
|
||||||
g_signal_emit (G_OBJECT (jpegenc), gst_jpegenc_signals[FRAME_ENCODED], 0);
|
g_signal_emit (G_OBJECT (jpegenc), gst_jpegenc_signals[FRAME_ENCODED], 0);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue