gst/asfdemux/gstasfdemux.c: Don't touch buffer if it is of size 0 (fixes #151064).

Original commit message from CVS:
Reviewed by:  Ronald S. Bultje  <rbultje@ronald.bitfreak.net>
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_chunk):
Don't touch buffer if it is of size 0 (fixes #151064).
This commit is contained in:
Ronald S. Bultje 2004-10-29 17:27:43 +00:00
parent 5facc1c6b7
commit edc08f902c
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2004-10-29 Martin Pitt <martin.pitt@canonical.com>
Reviewed by: Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_chunk):
Don't touch buffer if it is of size 0 (fixes #151064).
2004-10-29 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_push), (gst_ogg_pad_push):

View file

@ -1170,6 +1170,8 @@ gst_asf_demux_process_chunk (GstASFDemux * asf_demux,
stream->sequence = segment_info->sequence;
asf_demux->pts = segment_info->frag_timestamp - asf_demux->preroll;
got_bytes = gst_bytestream_peek (bs, &buffer, segment_info->chunk_size);
if (got_bytes == 0)
goto done;
GST_DEBUG ("BUFFER: Copied stream to buffer (%p - %d)", buffer,
GST_BUFFER_REFCOUNT_VALUE (buffer));
stream->payload = buffer;
@ -1185,6 +1187,8 @@ gst_asf_demux_process_chunk (GstASFDemux * asf_demux,
/* continuing packet */
GST_INFO ("A continuation packet");
got_bytes = gst_bytestream_peek (bs, &buffer, segment_info->chunk_size);
if (got_bytes == 0)
goto done;
GST_DEBUG ("Copied stream to buffer (%p - %d)", buffer,
GST_BUFFER_REFCOUNT_VALUE (buffer));
new_buffer = gst_buffer_merge (stream->payload, buffer);