mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
gst/mpegstream/gstrfc2250enc.c: Fix code that ignores return value of gst_buffer_merge(). (bug #114560)
Original commit message from CVS: * gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice): Fix code that ignores return value of gst_buffer_merge(). (bug #114560) * gst/asfdemux/gstasfdemux.c: (gst_asf_demux_descramble_segment): * gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice): same * testsuite/gst-lint: Check for above.
This commit is contained in:
parent
b30d611e93
commit
ed367671fd
3 changed files with 25 additions and 3 deletions
|
@ -1,3 +1,12 @@
|
|||
2004-03-05 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice):
|
||||
Fix code that ignores return value of gst_buffer_merge().
|
||||
(bug #114560)
|
||||
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_descramble_segment):
|
||||
* gst/mpegstream/gstrfc2250enc.c: (gst_rfc2250_enc_add_slice): same
|
||||
* testsuite/gst-lint: Check for above.
|
||||
|
||||
2004-03-05 David Schleef <ds@schleef.org>
|
||||
|
||||
* gst/udp/gstudpsrc.c: (gst_udpsrc_get): Check for unfixed
|
||||
|
|
|
@ -1001,8 +1001,13 @@ gst_asf_demux_descramble_segment (GstASFDemux *asf_demux,
|
|||
if (!offset) {
|
||||
descrambled_buffer = sub_buffer;
|
||||
} else {
|
||||
gst_buffer_merge (descrambled_buffer, sub_buffer);
|
||||
GstBuffer *newbuf;
|
||||
|
||||
newbuf = gst_buffer_merge (descrambled_buffer, sub_buffer);
|
||||
gst_buffer_unref (sub_buffer);
|
||||
gst_buffer_unref (descrambled_buffer);
|
||||
descrambled_buffer = newbuf;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -181,17 +181,25 @@ gst_rfc2250_enc_add_slice (GstRFC2250Enc *enc, GstBuffer *buffer)
|
|||
|
||||
/* see if the slice fits in the current buffer */
|
||||
if (slice_length <= enc->remaining) {
|
||||
gst_buffer_merge (enc->packet, buffer);
|
||||
GstBuffer *newbuf;
|
||||
|
||||
newbuf = gst_buffer_merge (enc->packet, buffer);
|
||||
gst_buffer_unref (buffer);
|
||||
gst_buffer_unref (enc->packet);
|
||||
enc->packet = newbuf;
|
||||
enc->remaining -= slice_length;
|
||||
}
|
||||
/* it doesn't fit */
|
||||
else {
|
||||
/* do we need to start a new packet? */
|
||||
if (slice_length <= enc->MTU) {
|
||||
GstBuffer *newbuf;
|
||||
|
||||
gst_rfc2250_enc_new_buffer (enc);
|
||||
gst_buffer_merge (enc->packet, buffer);
|
||||
newbuf = gst_buffer_merge (enc->packet, buffer);
|
||||
gst_buffer_unref (buffer);
|
||||
gst_buffer_unref (enc->packet);
|
||||
enc->packet = newbuf;
|
||||
enc->remaining -= slice_length;
|
||||
}
|
||||
/* else we have to fragment */
|
||||
|
|
Loading…
Reference in a new issue