Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
ea83a25e
Commit
ea83a25e
authored
Oct 13, 2008
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sanitize input headers (pass 4).
parent
497c80a2
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
126 additions
and
46 deletions
+126
-46
src/Makefile.am
src/Makefile.am
+2
-1
src/input/access.c
src/input/access.c
+1
-3
src/input/access.h
src/input/access.h
+43
-0
src/input/demux.c
src/input/demux.c
+2
-4
src/input/demux.h
src/input/demux.h
+3
-1
src/input/input.c
src/input/input.c
+1
-0
src/input/input_internal.h
src/input/input_internal.h
+1
-30
src/input/stream.c
src/input/stream.c
+5
-2
src/input/stream.h
src/input/stream.h
+65
-0
src/input/stream_memory.c
src/input/stream_memory.c
+3
-5
No files found.
src/Makefile.am
View file @
ea83a25e
...
...
@@ -311,10 +311,11 @@ SOURCES_libvlc_common = \
input/decoder.h
\
input/demux.h
\
input/es_out.h
\
input/stream.h
\
input/input_internal.h
\
input/vlm_internal.h
\
input/stream.c
\
input/
mem_stream
.c
\
input/
stream_memory
.c
\
input/subtitles.c
\
input/var.c
\
video_output/video_output.c
\
...
...
src/input/access.c
View file @
ea83a25e
...
...
@@ -25,10 +25,8 @@
# include "config.h"
#endif
#include <vlc_common.h>
#include <libvlc.h>
#include "access.h"
#include <libvlc.h>
/*****************************************************************************
* access_InternalNew:
...
...
src/input/access.h
0 → 100644
View file @
ea83a25e
/*****************************************************************************
* access.h: Input access functions
*****************************************************************************
* Copyright (C) 1998-2008 the VideoLAN team
* Copyright (C) 2008 Laurent Aimar
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
# error This header file can only be included from LibVLC.
#endif
#ifndef _INPUT_ACCESS_H
#define _INPUT_ACCESS_H 1
#include <vlc_common.h>
#include <vlc_access.h>
#define access_New( a, b, c, d ) __access_New(VLC_OBJECT(a), b, c, d )
access_t
*
__access_New
(
vlc_object_t
*
p_obj
,
const
char
*
psz_access
,
const
char
*
psz_demux
,
const
char
*
psz_path
);
access_t
*
access_FilterNew
(
access_t
*
p_source
,
const
char
*
psz_access_filter
);
void
access_Delete
(
access_t
*
);
#endif
src/input/demux.c
View file @
ea83a25e
...
...
@@ -25,11 +25,9 @@
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_codec.h>
#include "input_internal.h"
#include "demux.h"
#include <libvlc.h>
#include <vlc_codec.h>
static
bool
SkipID3Tag
(
demux_t
*
);
static
bool
SkipAPETag
(
demux_t
*
p_demux
);
...
...
src/input/demux.h
View file @
ea83a25e
...
...
@@ -29,9 +29,11 @@
#ifndef _INPUT_DEMUX_H
#define _INPUT_DEMUX_H 1
#include <
libvlc
.h>
#include <
vlc_common
.h>
#include <vlc_demux.h>
#include "stream.h"
/* stream_t *s could be null and then it mean a access+demux in one */
#define demux_New( a, b, c, d, e, f,g ) __demux_New(VLC_OBJECT(a),b,c,d,e,f,g)
demux_t
*
__demux_New
(
vlc_object_t
*
p_obj
,
const
char
*
psz_access
,
const
char
*
psz_demux
,
const
char
*
psz_path
,
stream_t
*
s
,
es_out_t
*
out
,
bool
);
...
...
src/input/input.c
View file @
ea83a25e
...
...
@@ -39,6 +39,7 @@
#include "es_out.h"
#include "access.h"
#include "demux.h"
#include "stream.h"
#include <vlc_sout.h>
#include "../stream_output/stream_output.h"
...
...
src/input/input_internal.h
View file @
ea83a25e
...
...
@@ -31,6 +31,7 @@
#include <vlc_access.h>
#include <vlc_demux.h>
#include <vlc_input.h>
#include <libvlc.h>
/*****************************************************************************
* Private input fields
...
...
@@ -372,34 +373,4 @@ char *input_CreateFilename( vlc_object_t *p_obj, const char *psz_path, const cha
#define INPUT_RECORD_PREFIX "vlc-record-%Y-%m-%d-%H:%M:%S-$ N-$ p"
/* Stream */
/**
* stream_t definition
*/
struct
stream_t
{
VLC_COMMON_MEMBERS
/*block_t *(*pf_block) ( stream_t *, int i_size );*/
int
(
*
pf_read
)
(
stream_t
*
,
void
*
p_read
,
unsigned
int
i_read
);
int
(
*
pf_peek
)
(
stream_t
*
,
const
uint8_t
**
pp_peek
,
unsigned
int
i_peek
);
int
(
*
pf_control
)(
stream_t
*
,
int
i_query
,
va_list
);
void
(
*
pf_destroy
)(
stream_t
*
);
stream_sys_t
*
p_sys
;
/* UTF-16 and UTF-32 file reading */
vlc_iconv_t
conv
;
int
i_char_width
;
bool
b_little_endian
;
};
#include <libvlc.h>
static
inline
stream_t
*
vlc_stream_create
(
vlc_object_t
*
obj
)
{
return
(
stream_t
*
)
vlc_custom_create
(
obj
,
sizeof
(
stream_t
),
VLC_OBJECT_GENERIC
,
"stream"
);
}
#endif
src/input/stream.c
View file @
ea83a25e
...
...
@@ -26,16 +26,19 @@
#endif
#include <dirent.h>
#include <assert.h>
#include <vlc_common.h>
#include <vlc_strings.h>
#include <vlc_osd.h>
#include <vlc_charset.h>
#include <
assert
.h>
#include <
libvlc
.h>
#include "input_internal.h"
#include "access.h"
#include "stream.h"
#include "input_internal.h"
#undef STREAM_DEBUG
...
...
src/input/stream.h
0 → 100644
View file @
ea83a25e
/*****************************************************************************
* stream.h: Input stream functions
*****************************************************************************
* Copyright (C) 1998-2008 the VideoLAN team
* Copyright (C) 2008 Laurent Aimar
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#if defined(__PLUGIN__) || defined(__BUILTIN__) || !defined(__LIBVLC__)
# error This header file can only be included from LibVLC.
#endif
#ifndef _INPUT_STREAM_H
#define _INPUT_STREAM_H 1
#include <vlc_common.h>
#include <vlc_stream.h>
/**
* stream_t definition
*/
struct
stream_t
{
VLC_COMMON_MEMBERS
/*block_t *(*pf_block) ( stream_t *, int i_size );*/
int
(
*
pf_read
)
(
stream_t
*
,
void
*
p_read
,
unsigned
int
i_read
);
int
(
*
pf_peek
)
(
stream_t
*
,
const
uint8_t
**
pp_peek
,
unsigned
int
i_peek
);
int
(
*
pf_control
)(
stream_t
*
,
int
i_query
,
va_list
);
void
(
*
pf_destroy
)(
stream_t
*
);
stream_sys_t
*
p_sys
;
/* UTF-16 and UTF-32 file reading */
vlc_iconv_t
conv
;
int
i_char_width
;
bool
b_little_endian
;
};
#include <libvlc.h>
static
inline
stream_t
*
vlc_stream_create
(
vlc_object_t
*
obj
)
{
return
(
stream_t
*
)
vlc_custom_create
(
obj
,
sizeof
(
stream_t
),
VLC_OBJECT_GENERIC
,
"stream"
);
}
#endif
src/input/
mem_stream
.c
→
src/input/
stream_memory
.c
View file @
ea83a25e
/*****************************************************************************
*
mem_stream
.c: stream_t wrapper around memory buffer
*
stream_memory
.c: stream_t wrapper around memory buffer
*****************************************************************************
* Copyright (C) 1999-200
4
the VideoLAN team
* Copyright (C) 1999-200
8
the VideoLAN team
* $Id$
*
* Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
...
...
@@ -25,9 +25,7 @@
# include "config.h"
#endif
#include <vlc_common.h>
#include "input_internal.h"
#include "stream.h"
struct
stream_sys_t
{
...
...
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