From 04b1c69ce14a744313624bb73e546342461bac4f Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 14 Dec 2001 12:15:27 +0000 Subject: [PATCH] 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. --- gst/elements/gstfilesrc.c | 3 ++- plugins/elements/gstfilesrc.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gst/elements/gstfilesrc.c b/gst/elements/gstfilesrc.c index f6843e1..c2f0f53 100644 --- a/gst/elements/gstfilesrc.c +++ b/gst/elements/gstfilesrc.c @@ -511,8 +511,9 @@ gst_filesrc_get (GstPad *pad) /* if we need to touch the buffer (to bring it into memory), do so */ if (src->touch) { + volatile guchar *p = GST_BUFFER_DATA (buf), c; for (i=0;ipagesize) - *(GST_BUFFER_DATA(buf)+i) = *(GST_BUFFER_DATA(buf)+i); + c = p[i]; } /* we're done, return the buffer */ diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c index f6843e1..c2f0f53 100644 --- a/plugins/elements/gstfilesrc.c +++ b/plugins/elements/gstfilesrc.c @@ -511,8 +511,9 @@ gst_filesrc_get (GstPad *pad) /* if we need to touch the buffer (to bring it into memory), do so */ if (src->touch) { + volatile guchar *p = GST_BUFFER_DATA (buf), c; for (i=0;ipagesize) - *(GST_BUFFER_DATA(buf)+i) = *(GST_BUFFER_DATA(buf)+i); + c = p[i]; } /* we're done, return the buffer */ -- 2.7.4