~ubuntu-branches/ubuntu/raring/gst-plugins-good0.10/raring-proposed

« back to all changes in this revision

Viewing changes to ext/jpeg/gstjpegenc.c

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen
  • Date: 2012-02-09 16:44:53 UTC
  • mfrom: (40.2.38 experimental)
  • Revision ID: package-import@ubuntu.com-20120209164453-6hjokwrvdn42zopb
Tags: 0.10.30.3-1ubuntu1
* Merge from Debian experimental, remaining changes:
  - 04_move_farsight_plugins_to_good.patch
    Import autoconvert, dtmf, liveadder, rptmux from -plugins-bad
  - 05_move_shm_to_good.patch
    Import shm from -plugins-bad.
  - 07_move-camerabin.patch
    Import camerabin, camerabin2, jpegformat and basecamerabinsrc
    from -plugins-bad.
  - control*:
    * Drop dependency from gstreamer0.10-plugins-good on
      gstreamer0.10-gconf. It pulls gconf and gtk3 onto the Kubuntu cd.
    * Use Breaks instead of Conflicts.
    * Add a 'Pre-Depends: ${misc:Pre-Depends}' to the plugin package,
      since we're shipping shared libraries in the package that Debian
      isn't.
* Update the patches by pulling new version of the code from
  -plugins-bad 0.10.22.3.

Show diffs side-by-side

added added

removed removed

Lines of Context:
210
210
  GstBuffer *overflow_buffer;
211
211
  guint32 old_buffer_size;
212
212
  GstJpegEnc *jpegenc = (GstJpegEnc *) (cinfo->client_data);
 
213
  GstFlowReturn ret;
 
214
 
213
215
  GST_DEBUG_OBJECT (jpegenc,
214
216
      "gst_jpegenc_chain: flush_destination: buffer too small");
215
217
 
216
218
  /* Our output buffer wasn't big enough.
217
219
   * Make a new buffer that's twice the size, */
218
220
  old_buffer_size = GST_BUFFER_SIZE (jpegenc->output_buffer);
219
 
  gst_pad_alloc_buffer_and_set_caps (jpegenc->srcpad,
 
221
  ret = gst_pad_alloc_buffer_and_set_caps (jpegenc->srcpad,
220
222
      GST_BUFFER_OFFSET_NONE, old_buffer_size * 2,
221
223
      GST_PAD_CAPS (jpegenc->srcpad), &overflow_buffer);
 
224
  /* handle here if needed */
 
225
  if (ret != GST_FLOW_OK) {
 
226
    overflow_buffer = gst_buffer_new_and_alloc (old_buffer_size * 2);
 
227
    gst_buffer_set_caps (overflow_buffer, GST_PAD_CAPS (jpegenc->srcpad));
 
228
  }
 
229
 
222
230
  memcpy (GST_BUFFER_DATA (overflow_buffer),
223
231
      GST_BUFFER_DATA (jpegenc->output_buffer), old_buffer_size);
224
232