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
491ca220
Commit
491ca220
authored
Jul 18, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream.c: do not drop empty line.
parent
d8f026b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
14 deletions
+4
-14
src/input/stream.c
src/input/stream.c
+4
-14
No files found.
src/input/stream.c
View file @
491ca220
...
@@ -1179,17 +1179,6 @@ char *stream_ReadLine( stream_t *s )
...
@@ -1179,17 +1179,6 @@ char *stream_ReadLine( stream_t *s )
i_line
+=
(
i_data
-
1
);
i_line
+=
(
i_data
-
1
);
i_read
+=
i_data
;
i_read
+=
i_data
;
/* Remove trailing LF/CR */
while
(
stream_Peek
(
s
,
&
p_data
,
1
)
==
1
&&
i_read
<
STREAM_LINE_MAX
)
{
if
(
p_data
[
0
]
!=
'\n'
&&
p_data
[
0
]
!=
'\r'
)
break
;
i_data
=
stream_Read
(
s
,
NULL
,
1
);
if
(
i_data
<=
0
)
break
;
/* Hmmm */
i_read
+=
i_data
;
}
/* We have our line */
/* We have our line */
break
;
break
;
}
}
...
@@ -1202,15 +1191,16 @@ char *stream_ReadLine( stream_t *s )
...
@@ -1202,15 +1191,16 @@ char *stream_ReadLine( stream_t *s )
i_read
+=
i_data
;
i_read
+=
i_data
;
}
}
/* Remove trailing CR */
/* Remove trailing
LF/
CR */
while
(
i_line
>
0
&&
p_line
[
i_line
-
1
]
==
'\r'
)
i_line
--
;
while
(
i_line
>
0
&&
(
p_line
[
i_line
-
1
]
==
'\r'
||
p_line
[
i_line
-
1
]
==
'\n'
)
)
i_line
--
;
if
(
i_
line
>
0
)
if
(
i_
read
>
0
)
{
{
p_line
[
i_line
]
=
'\0'
;
p_line
[
i_line
]
=
'\0'
;
return
p_line
;
return
p_line
;
}
}
/* We failed to read any data, probably EOF*/
if
(
p_line
)
free
(
p_line
);
if
(
p_line
)
free
(
p_line
);
return
NULL
;
return
NULL
;
}
}
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