~ubuntu-branches/ubuntu/trusty/gst-plugins-base1.0/trusty

« back to all changes in this revision

Viewing changes to gst/audioconvert/gstaudioconvert.c

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2013-11-15 10:13:40 UTC
  • mfrom: (1.1.19) (21.1.1 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20131115101340-1svovntvcbntyntt
Tags: 1.2.1-2ubuntu1
* Merge from Debian unstable.  Remaining changes:
  + debian/patches/aarch64_fail_neon_check.patch: Disable NEON
    on arm64, as the assembly is ARMv7-specific.
* Fix "Description: Description:" in control. Thanks, lintian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
789
789
  GstAudioConvert *this = GST_AUDIO_CONVERT (base);
790
790
  GstMapInfo srcmap, dstmap;
791
791
  gint insize, outsize;
 
792
  gboolean inbuf_writable;
792
793
 
793
794
  gint samples;
794
795
 
803
804
  if (insize == 0 || outsize == 0)
804
805
    return GST_FLOW_OK;
805
806
 
 
807
  inbuf_writable = gst_buffer_is_writable (inbuf)
 
808
      && gst_buffer_n_memory (inbuf) == 1
 
809
      && gst_memory_is_writable (gst_buffer_peek_memory (inbuf, 0));
 
810
 
806
811
  /* get src and dst data */
807
 
  gst_buffer_map (inbuf, &srcmap, GST_MAP_READ);
 
812
  gst_buffer_map (inbuf, &srcmap,
 
813
      inbuf_writable ? GST_MAP_READWRITE : GST_MAP_READ);
808
814
  gst_buffer_map (outbuf, &dstmap, GST_MAP_WRITE);
809
815
 
810
816
  /* check in and outsize */
816
822
  /* and convert the samples */
817
823
  if (!GST_BUFFER_FLAG_IS_SET (inbuf, GST_BUFFER_FLAG_GAP)) {
818
824
    if (!audio_convert_convert (&this->ctx, srcmap.data, dstmap.data,
819
 
            samples, gst_buffer_is_writable (inbuf)))
 
825
            samples, inbuf_writable))
820
826
      goto convert_error;
821
827
  } else {
822
828
    /* Create silence buffer */