gst-libs/gst/riff/riff-read.c: Don't bail out on JUNK chunks with a size of 0 (would try to pull_range 0 bytes before...
Original commit message from CVS: * gst-libs/gst/riff/riff-read.c: (gst_riff_read_chunk): Don't bail out on JUNK chunks with a size of 0 (would try to pull_range 0 bytes before, which sources don't like too much). See #342345.
This commit is contained in:
parent
f3b81a7de1
commit
3ef484fe2b
@ -1,3 +1,10 @@
|
|||||||
|
2006-05-19 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* gst-libs/gst/riff/riff-read.c: (gst_riff_read_chunk):
|
||||||
|
Don't bail out on JUNK chunks with a size of 0 (would try to
|
||||||
|
pull_range 0 bytes before, which sources don't like too much).
|
||||||
|
See #342345.
|
||||||
|
|
||||||
2006-05-19 Jan Schmidt <thaytan@mad.scientist.com>
|
2006-05-19 Jan Schmidt <thaytan@mad.scientist.com>
|
||||||
|
|
||||||
* gst/videoscale/gstvideoscale.c: (gst_video_scale_fixate_caps):
|
* gst/videoscale/gstvideoscale.c: (gst_video_scale_fixate_caps):
|
||||||
|
@ -69,14 +69,18 @@ gst_riff_read_chunk (GstElement * element,
|
|||||||
memcpy (dbg, tag, 4);
|
memcpy (dbg, tag, 4);
|
||||||
GST_DEBUG_OBJECT (element, "tag=%s, size=%u", dbg, size);
|
GST_DEBUG_OBJECT (element, "tag=%s, size=%u", dbg, size);
|
||||||
|
|
||||||
if ((res = gst_pad_pull_range (pad, offset + 8, size, &buf)) != GST_FLOW_OK)
|
if (*tag == GST_RIFF_TAG_JUNK && size == 0) {
|
||||||
return res;
|
buf = gst_buffer_new ();
|
||||||
else if (!buf || GST_BUFFER_SIZE (buf) < size) {
|
} else {
|
||||||
GST_DEBUG_OBJECT (element, "not enough data (available=%u, needed=%u)",
|
if ((res = gst_pad_pull_range (pad, offset + 8, size, &buf)) != GST_FLOW_OK)
|
||||||
(buf) ? GST_BUFFER_SIZE (buf) : 0, size);
|
return res;
|
||||||
if (buf)
|
if (!buf || GST_BUFFER_SIZE (buf) < size) {
|
||||||
gst_buffer_unref (buf);
|
GST_DEBUG_OBJECT (element, "not enough data (available=%u, needed=%u)",
|
||||||
return GST_FLOW_ERROR;
|
(buf) ? GST_BUFFER_SIZE (buf) : 0, size);
|
||||||
|
if (buf)
|
||||||
|
gst_buffer_unref (buf);
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*_chunk_data = buf;
|
*_chunk_data = buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user