~sipe-collab/sipe-collab/gstreamer-plugins-base

« back to all changes in this revision

Viewing changes to gst/adder/gstadder.c

  • Committer: Sebastian Dröge
  • Date: 2014-04-19 13:47:47 UTC
  • mfrom: (1.1.23)
  • Revision ID: git-v1:d06393f82dba0d5f13ec2e66275d75cf8178fe5c
Merge tag 'upstream/1.2.4'

Upstream version 1.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1143
1143
  gint64 next_timestamp;
1144
1144
  gint rate, bps, bpf;
1145
1145
  gboolean had_mute = FALSE;
 
1146
  gboolean is_eos = TRUE;
1146
1147
 
1147
1148
  adder = GST_ADDER (user_data);
1148
1149
 
1221
1222
  /* get available bytes for reading, this can be 0 which could mean empty
1222
1223
   * buffers or EOS, which we will catch when we loop over the pads. */
1223
1224
  outsize = gst_collect_pads_available (pads);
1224
 
  /* can only happen when no pads to collect or all EOS */
1225
 
  if (outsize == 0)
1226
 
    goto eos;
1227
1225
 
1228
1226
  GST_LOG_OBJECT (adder,
1229
1227
      "starting to cycle through channels, %d bytes available (bps = %d, bpf = %d)",
1245
1243
    /* get a buffer of size bytes, if we get a buffer, it is at least outsize
1246
1244
     * bytes big. */
1247
1245
    inbuf = gst_collect_pads_take_buffer (pads, collect_data, outsize);
 
1246
 
 
1247
    if (!GST_COLLECT_PADS_STATE_IS_SET (collect_data,
 
1248
                    GST_COLLECT_PADS_STATE_EOS))
 
1249
      is_eos = FALSE;
 
1250
 
1248
1251
    /* NULL means EOS or an empty buffer so we still need to flush in
1249
1252
     * case of an empty buffer. */
1250
1253
    if (inbuf == NULL) {
1438
1441
    }
1439
1442
    GST_OBJECT_UNLOCK (pad);
1440
1443
  }
 
1444
 
1441
1445
  if (outbuf)
1442
1446
    gst_buffer_unmap (outbuf, &outmap);
1443
1447
 
 
1448
  if (is_eos)
 
1449
    goto eos;
 
1450
 
1444
1451
  if (outbuf == NULL) {
1445
1452
    /* no output buffer, reuse one of the GAP buffers then if we have one */
1446
1453
    if (gapbuf) {