mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
Don't wrtie to the page we have mmaped read only.
Original commit message from CVS: Don't wrtie to the page we have mmaped read only.
This commit is contained in:
parent
3fbb463174
commit
04b1c69ce1
2 changed files with 4 additions and 2 deletions
|
@ -511,8 +511,9 @@ gst_filesrc_get (GstPad *pad)
|
||||||
|
|
||||||
/* if we need to touch the buffer (to bring it into memory), do so */
|
/* if we need to touch the buffer (to bring it into memory), do so */
|
||||||
if (src->touch) {
|
if (src->touch) {
|
||||||
|
volatile guchar *p = GST_BUFFER_DATA (buf), c;
|
||||||
for (i=0;i<GST_BUFFER_SIZE(buf);i+=src->pagesize)
|
for (i=0;i<GST_BUFFER_SIZE(buf);i+=src->pagesize)
|
||||||
*(GST_BUFFER_DATA(buf)+i) = *(GST_BUFFER_DATA(buf)+i);
|
c = p[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we're done, return the buffer */
|
/* we're done, return the buffer */
|
||||||
|
|
|
@ -511,8 +511,9 @@ gst_filesrc_get (GstPad *pad)
|
||||||
|
|
||||||
/* if we need to touch the buffer (to bring it into memory), do so */
|
/* if we need to touch the buffer (to bring it into memory), do so */
|
||||||
if (src->touch) {
|
if (src->touch) {
|
||||||
|
volatile guchar *p = GST_BUFFER_DATA (buf), c;
|
||||||
for (i=0;i<GST_BUFFER_SIZE(buf);i+=src->pagesize)
|
for (i=0;i<GST_BUFFER_SIZE(buf);i+=src->pagesize)
|
||||||
*(GST_BUFFER_DATA(buf)+i) = *(GST_BUFFER_DATA(buf)+i);
|
c = p[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we're done, return the buffer */
|
/* we're done, return the buffer */
|
||||||
|
|
Loading…
Reference in a new issue