Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
9f9f4cf8
Commit
9f9f4cf8
authored
Aug 31, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplifications
parent
32f31161
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
src/input/stream.c
src/input/stream.c
+11
-15
No files found.
src/input/stream.c
View file @
9f9f4cf8
...
...
@@ -1831,29 +1831,26 @@ char *stream_ReadLine( stream_t *s )
/* BOM detection */
i_pos
=
stream_Tell
(
s
);
if
(
i_pos
==
0
&&
i_data
>
4
)
if
(
i_pos
==
0
&&
i_data
>
=
3
)
{
int
i_bom_size
=
0
;
char
*
psz_encoding
=
NULL
;
c
onst
c
har
*
psz_encoding
=
NULL
;
if
(
p_data
[
0
]
==
0xEF
&&
p_data
[
1
]
==
0xBB
&&
p_data
[
2
]
==
0xBF
)
if
(
!
memcmp
(
p_data
,
"
\xEF\xBB\xBF
"
,
3
)
)
{
psz_encoding
=
strdup
(
"UTF-8"
)
;
psz_encoding
=
"UTF-8"
;
i_bom_size
=
3
;
}
else
if
(
p_data
[
0
]
==
0xFF
&&
p_data
[
1
]
==
0xFE
)
else
if
(
!
memcmp
(
p_data
,
"
\xFF\xFE
"
,
2
)
)
{
if
(
p_data
[
2
]
||
p_data
[
3
]
)
{
psz_encoding
=
strdup
(
"UTF-16LE"
);
s
->
b_little_endian
=
true
;
s
->
i_char_width
=
2
;
i_bom_size
=
2
;
}
psz_encoding
=
"UTF-16LE"
;
s
->
b_little_endian
=
true
;
s
->
i_char_width
=
2
;
i_bom_size
=
2
;
}
else
if
(
p_data
[
0
]
==
0xFE
&&
p_data
[
1
]
==
0xFF
)
else
if
(
!
memcmp
(
p_data
,
"
\xFE\xFF
"
,
2
)
)
{
psz_encoding
=
strdup
(
"UTF-16BE"
)
;
psz_encoding
=
"UTF-16BE"
;
s
->
i_char_width
=
2
;
i_bom_size
=
2
;
}
...
...
@@ -1886,7 +1883,6 @@ char *stream_ReadLine( stream_t *s )
var_SetString
(
p_input
,
"subsdec-encoding"
,
"UTF-8"
);
vlc_object_release
(
p_input
);
}
free
(
psz_encoding
);
}
}
...
...
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