mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-26 17:18:15 +00:00
gst/: Handle negative offsets better. Fixes decodebin.
Original commit message from CVS: * gst/base/gsttypefindhelper.c: (helper_find_peek): * gst/elements/gsttypefindelement.c: (find_peek): Handle negative offsets better. Fixes decodebin.
This commit is contained in:
parent
e70ec7b807
commit
5b9c84091d
5 changed files with 10 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2005-05-09 Ronald S. Bultje <rbultje@ronald.bitfreak.net>
|
||||
|
||||
* gst/base/gsttypefindhelper.c: (helper_find_peek):
|
||||
* gst/elements/gsttypefindelement.c: (find_peek):
|
||||
Handle negative offsets better. Fixes decodebin.
|
||||
|
||||
2005-05-09 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/base/gstbasetransform.c: (gst_base_transform_proxy_getcaps),
|
||||
|
|
|
@ -57,7 +57,7 @@ helper_find_peek (gpointer data, gint64 offset, guint size)
|
|||
src = find->src;
|
||||
|
||||
if (offset < 0) {
|
||||
if (find->size == -1)
|
||||
if (find->size == -1 || find->size < -offset)
|
||||
return NULL;
|
||||
|
||||
offset += find->size;
|
||||
|
|
|
@ -572,7 +572,7 @@ find_peek (gpointer data, gint64 offset, guint size)
|
|||
/* FIXME: can we do this easily without querying length? */
|
||||
guint64 length = find_element_get_length (data);
|
||||
|
||||
if (length == 0) {
|
||||
if (length < -offset) {
|
||||
buf = NULL;
|
||||
} else {
|
||||
buf =
|
||||
|
|
|
@ -57,7 +57,7 @@ helper_find_peek (gpointer data, gint64 offset, guint size)
|
|||
src = find->src;
|
||||
|
||||
if (offset < 0) {
|
||||
if (find->size == -1)
|
||||
if (find->size == -1 || find->size < -offset)
|
||||
return NULL;
|
||||
|
||||
offset += find->size;
|
||||
|
|
|
@ -572,7 +572,7 @@ find_peek (gpointer data, gint64 offset, guint size)
|
|||
/* FIXME: can we do this easily without querying length? */
|
||||
guint64 length = find_element_get_length (data);
|
||||
|
||||
if (length == 0) {
|
||||
if (length < -offset) {
|
||||
buf = NULL;
|
||||
} else {
|
||||
buf =
|
||||
|
|
Loading…
Reference in a new issue