Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
f4941313
Commit
f4941313
authored
Feb 18, 2006
by
Antoine Cellerier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use EnsureUTF8 on output string
parent
c4d8e42c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
modules/video_filter/rss.c
modules/video_filter/rss.c
+28
-4
No files found.
modules/video_filter/rss.c
View file @
f4941313
/*****************************************************************************
/*****************************************************************************
* rss.c : rss feed display video plugin for vlc
* rss.c : rss feed display video plugin for vlc
*****************************************************************************
*****************************************************************************
* Copyright (C) 2003-200
5
the VideoLAN team
* Copyright (C) 2003-200
6
the VideoLAN team
* $Id$
* $Id$
*
*
* Authors: Antoine Cellerier <dionoea
@videolan.
org>
* Authors: Antoine Cellerier <dionoea
-at- videolan -dot-
org>
*
*
* This program is free software; you can redistribute it and/or modify
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* it under the terms of the GNU General Public License as published by
...
@@ -355,14 +355,38 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
...
@@ -355,14 +355,38 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
return
NULL
;
return
NULL
;
}
}
/* Generate the string that will be displayed. This string is supposed to
be p_sys->i_length characters long. */
i_item
=
p_sys
->
i_cur_item
;
i_item
=
p_sys
->
i_cur_item
;
i_feed
=
p_sys
->
i_cur_feed
;
i_feed
=
p_sys
->
i_cur_feed
;
snprintf
(
p_sys
->
psz_marquee
,
p_sys
->
i_length
,
"%s : %s"
,
p_sys
->
p_feeds
[
i_feed
].
psz_title
,
p_sys
->
p_feeds
[
i_feed
].
p_items
[
i_item
].
psz_title
+
p_sys
->
i_cur_char
);
snprintf
(
p_sys
->
psz_marquee
,
p_sys
->
i_length
,
"%s : %s"
,
p_sys
->
p_feeds
[
i_feed
].
psz_title
,
p_sys
->
p_feeds
[
i_feed
].
p_items
[
i_item
].
psz_title
+
p_sys
->
i_cur_char
);
while
(
strlen
(
p_sys
->
psz_marquee
)
<
(
unsigned
int
)
p_sys
->
i_length
)
while
(
strlen
(
p_sys
->
psz_marquee
)
<
(
unsigned
int
)
p_sys
->
i_length
)
{
{
i_item
++
;
i_item
++
;
if
(
i_item
==
p_sys
->
p_feeds
[
i_feed
].
i_items
)
break
;
if
(
i_item
==
p_sys
->
p_feeds
[
i_feed
].
i_items
)
break
;
snprintf
(
strchr
(
p_sys
->
psz_marquee
,
0
),
p_sys
->
i_length
-
strlen
(
p_sys
->
psz_marquee
),
" - %s"
,
p_sys
->
p_feeds
[
i_feed
].
p_items
[
i_item
].
psz_title
);
snprintf
(
strchr
(
p_sys
->
psz_marquee
,
0
),
p_sys
->
i_length
-
strlen
(
p_sys
->
psz_marquee
),
" - %s"
,
p_sys
->
p_feeds
[
i_feed
].
p_items
[
i_item
].
psz_title
);
}
/* Calls to snprintf might split multibyte UTF8 chars ...
* which freetype doesn't like. */
{
char
*
a
=
strdup
(
p_sys
->
psz_marquee
);
char
*
a2
=
a
;
char
*
b
=
p_sys
->
psz_marquee
;
EnsureUTF8
(
p_sys
->
psz_marquee
);
/* we want to use ' ' instead of '?' for erroneous chars */
while
(
*
b
!=
'\0'
)
{
if
(
*
b
!=
*
a
)
*
b
=
' '
;
b
++
;
a
++
;
}
free
(
a2
);
}
}
p_spu
->
p_region
->
psz_text
=
strdup
(
p_sys
->
psz_marquee
);
p_spu
->
p_region
->
psz_text
=
strdup
(
p_sys
->
psz_marquee
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment