mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
Update for alloc_buffer changes.
Original commit message from CVS: 2005-12-05 Andy Wingo <wingo@pobox.com> * ext/a52dec/gsta52dec.c: (gst_a52dec_push): * ext/mad/gstmad.c: (gst_mad_chain): * ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_alloc_buffer): * gst/dvdlpcmdec/gstdvdlpcmdec.c: (gst_dvdlpcmdec_chain_raw): * gst/iec958/ac3iec.c: (ac3iec_chain_raw): * gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream), (gst_rmdemux_parse_packet): Update for alloc_buffer changes.
This commit is contained in:
parent
0f3d1be313
commit
be0fdf972b
7 changed files with 32 additions and 15 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
|||
2005-12-05 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* ext/a52dec/gsta52dec.c: (gst_a52dec_push):
|
||||
* ext/mad/gstmad.c: (gst_mad_chain):
|
||||
* ext/mpeg2dec/gstmpeg2dec.c: (gst_mpeg2dec_alloc_buffer):
|
||||
* gst/dvdlpcmdec/gstdvdlpcmdec.c: (gst_dvdlpcmdec_chain_raw):
|
||||
* gst/iec958/ac3iec.c: (ac3iec_chain_raw):
|
||||
* gst/realmedia/rmdemux.c: (gst_rmdemux_add_stream),
|
||||
(gst_rmdemux_parse_packet): Update for alloc_buffer changes.
|
||||
|
||||
2005-12-05 Andy Wingo <wingo@pobox.com>
|
||||
|
||||
* ext/mad/gstid3tag.c (plugin_init): Remove id3tag -- there's just
|
||||
|
|
|
@ -292,8 +292,9 @@ gst_a52dec_push (GstA52Dec * a52dec,
|
|||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
result = gst_pad_alloc_buffer (srcpad, 0, 256 * chans * (SAMPLE_WIDTH / 8),
|
||||
GST_PAD_CAPS (srcpad), &buf);
|
||||
result =
|
||||
gst_pad_alloc_buffer_and_set_caps (srcpad, 0,
|
||||
256 * chans * (SAMPLE_WIDTH / 8), GST_PAD_CAPS (srcpad), &buf);
|
||||
if (result != GST_FLOW_OK)
|
||||
return result;
|
||||
|
||||
|
|
|
@ -1498,8 +1498,9 @@ gst_mad_chain (GstPad * pad, GstBuffer * buffer)
|
|||
|
||||
/* will attach the caps to the buffer */
|
||||
result =
|
||||
gst_pad_alloc_buffer (mad->srcpad, 0, nsamples * mad->channels * 2,
|
||||
GST_PAD_CAPS (mad->srcpad), &outbuffer);
|
||||
gst_pad_alloc_buffer_and_set_caps (mad->srcpad, 0,
|
||||
nsamples * mad->channels * 2, GST_PAD_CAPS (mad->srcpad),
|
||||
&outbuffer);
|
||||
if (result != GST_FLOW_OK) {
|
||||
/* Head for the exit, dropping samples as we go */
|
||||
GST_LOG ("Skipping frame synthesis due to pad_alloc return value");
|
||||
|
|
|
@ -423,8 +423,9 @@ gst_mpeg2dec_alloc_buffer (GstMpeg2dec * mpeg2dec, gint64 offset,
|
|||
|
||||
if (mpeg2dec->format == MPEG2DEC_FORMAT_I422) {
|
||||
ret =
|
||||
gst_pad_alloc_buffer (mpeg2dec->srcpad, GST_BUFFER_OFFSET_NONE,
|
||||
size * 2, GST_PAD_CAPS (mpeg2dec->srcpad), &outbuf);
|
||||
gst_pad_alloc_buffer_and_set_caps (mpeg2dec->srcpad,
|
||||
GST_BUFFER_OFFSET_NONE, size * 2, GST_PAD_CAPS (mpeg2dec->srcpad),
|
||||
&outbuf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto no_buffer;
|
||||
|
||||
|
@ -436,8 +437,9 @@ gst_mpeg2dec_alloc_buffer (GstMpeg2dec * mpeg2dec, gint64 offset,
|
|||
|
||||
} else {
|
||||
ret =
|
||||
gst_pad_alloc_buffer (mpeg2dec->srcpad, GST_BUFFER_OFFSET_NONE,
|
||||
(size * 3) / 2, GST_PAD_CAPS (mpeg2dec->srcpad), &outbuf);
|
||||
gst_pad_alloc_buffer_and_set_caps (mpeg2dec->srcpad,
|
||||
GST_BUFFER_OFFSET_NONE, (size * 3) / 2, GST_PAD_CAPS (mpeg2dec->srcpad),
|
||||
&outbuf);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto no_buffer;
|
||||
|
||||
|
@ -464,7 +466,7 @@ gst_mpeg2dec_alloc_buffer (GstMpeg2dec * mpeg2dec, gint64 offset,
|
|||
done:
|
||||
if (ret != GST_FLOW_OK) {
|
||||
outbuf = NULL; /* just to asure NULL return, looking the path
|
||||
above it happens only when gst_pad_alloc_buffer
|
||||
above it happens only when gst_pad_alloc_buffer_and_set_caps
|
||||
fails to alloc outbf */
|
||||
}
|
||||
*obuf = outbuf;
|
||||
|
|
|
@ -464,7 +464,7 @@ gst_dvdlpcmdec_chain_raw (GstPad * pad, GstBuffer * buf)
|
|||
GstBuffer *outbuf;
|
||||
GstCaps *bufcaps = GST_PAD_CAPS (dvdlpcmdec->srcpad);
|
||||
|
||||
ret = gst_pad_alloc_buffer (dvdlpcmdec->srcpad, 0,
|
||||
ret = gst_pad_alloc_buffer_and_set_caps (dvdlpcmdec->srcpad, 0,
|
||||
samples * 3, bufcaps, &outbuf);
|
||||
|
||||
if (ret != GST_FLOW_OK)
|
||||
|
|
|
@ -312,8 +312,9 @@ ac3iec_chain_raw (GstPad * pad, GstBuffer * buf)
|
|||
GstCaps *bufcaps = GST_PAD_CAPS (ac3iec->src);
|
||||
|
||||
/* Create a new buffer, and copy the frame data into it. */
|
||||
ret = gst_pad_alloc_buffer (ac3iec->src, 0, AC3P_IEC_FRAME_SIZE,
|
||||
bufcaps, &new);
|
||||
ret =
|
||||
gst_pad_alloc_buffer_and_set_caps (ac3iec->src, 0,
|
||||
AC3P_IEC_FRAME_SIZE, bufcaps, &new);
|
||||
if (ret != GST_FLOW_OK)
|
||||
goto buffer_alloc_failed;
|
||||
|
||||
|
|
|
@ -1367,7 +1367,7 @@ gst_rmdemux_add_stream (GstRMDemux * rmdemux, GstRMDemuxStream * stream)
|
|||
if (stream->extra_data_size > 0) {
|
||||
GstBuffer *buffer;
|
||||
|
||||
if ((ret = gst_pad_alloc_buffer
|
||||
if ((ret = gst_pad_alloc_buffer_and_set_caps
|
||||
(stream->pad, GST_BUFFER_OFFSET_NONE, stream->extra_data_size,
|
||||
stream->caps, &buffer))
|
||||
!= GST_FLOW_OK) {
|
||||
|
@ -1743,8 +1743,10 @@ gst_rmdemux_parse_packet (GstRMDemux * rmdemux, const void *data,
|
|||
|
||||
if ((rmdemux->offset + packet_size) > stream->seek_offset &&
|
||||
stream && stream->pad) {
|
||||
if ((ret = gst_pad_alloc_buffer (stream->pad, GST_BUFFER_OFFSET_NONE,
|
||||
packet_size, stream->caps, &buffer)) != GST_FLOW_OK) {
|
||||
if ((ret =
|
||||
gst_pad_alloc_buffer_and_set_caps (stream->pad,
|
||||
GST_BUFFER_OFFSET_NONE, packet_size, stream->caps,
|
||||
&buffer)) != GST_FLOW_OK) {
|
||||
GST_WARNING_OBJECT (rmdemux, "failed to alloc src buffer for stream %d",
|
||||
id);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in a new issue