Re: [PATCH] Update stream position after seeking is done

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for reminding me. changed like FT_Stream_Seek deals with.

BTW I think posting patches here would be a good idea to make the code
visible for reviews though, it's a bit hard to keep it on track.
particularly there are no time to have a look at it. so I'd recommend
to file a bug to bugzilla too.
I'm also pondering to change the initial bug owner to the list (maybe
a separate list like fontconfig-bugs?) and open to watch bugs if one
prefer :)

On Wed, Feb 22, 2012 at 4:36 PM, Jjgod Jiang <gzjjgod@xxxxxxxxx> wrote:
> Hi Akira,
>
> Any chance of getting this patch in? Thanks.
>
> ---------- Forwarded message ----------
> From: Jiang Jiang <gzjjgod@xxxxxxxxx>
> Date: Tue, Nov 29, 2011 at 11:56 AM
> Subject: [PATCH] Update stream position after seeking is done
> To: fontconfig@xxxxxxxxxxxxxxxxxxxxx
> Cc: Jiang Jiang <jiang.jiang@xxxxxxxxx>
>
>
> From: Jiang Jiang <jiang.jiang@xxxxxxxxx>
>
> In stream->read function there will be check like if (stream->pos !=
> pos) then fseek(...), so if stream->pos is set to pos before read then
> the seek may never happen.
> ---
>  src/ftglue.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/ftglue.c b/src/ftglue.c
> index d5af810..b9e2129 100644
> --- a/src/ftglue.c
> +++ b/src/ftglue.c
> @@ -82,7 +82,6 @@ ftglue_stream_seek( FT_Stream   stream,
>  {
>   FT_Error  error = 0;
>
> -  stream->pos = pos;
>   if ( stream->read )
>   {
>     if ( stream->read( stream, pos, 0, 0 ) )
> @@ -91,6 +90,7 @@ ftglue_stream_seek( FT_Stream   stream,
>   else if ( pos > stream->size )
>     error = FT_Err_Invalid_Stream_Operation;
>
> +  stream->pos = pos;
>   LOG(( "ftglue:stream:seek(%ld) -> %d\n", pos, error ));
>   return error;
>  }
> --
> 1.7.4.1



-- 
Akira TAGOH
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/fontconfig



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux