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
5b95e796
Commit
5b95e796
authored
Aug 09, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filter: simplify filter owner usage
Also remove unchecked memory allocation.
parent
0d7be541
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
15 deletions
+2
-15
src/audio_output/aout_internal.h
src/audio_output/aout_internal.h
+0
-6
src/audio_output/filters.c
src/audio_output/filters.c
+0
-2
src/audio_output/input.c
src/audio_output/input.c
+2
-7
No files found.
src/audio_output/aout_internal.h
View file @
5b95e796
...
@@ -42,12 +42,6 @@ typedef struct
...
@@ -42,12 +42,6 @@ typedef struct
void
*
p_private
;
void
*
p_private
;
}
aout_request_vout_t
;
}
aout_request_vout_t
;
struct
filter_owner_sys_t
{
audio_output_t
*
p_aout
;
aout_input_t
*
p_input
;
};
typedef
struct
aout_volume
aout_volume_t
;
typedef
struct
aout_volume
aout_volume_t
;
/** an input stream for the audio output */
/** an input stream for the audio output */
...
...
src/audio_output/filters.c
View file @
5b95e796
...
@@ -59,7 +59,6 @@ static filter_t * FindFilter( vlc_object_t *obj,
...
@@ -59,7 +59,6 @@ static filter_t * FindFilter( vlc_object_t *obj,
p_filter
->
fmt_in
.
i_codec
=
infmt
->
i_format
;
p_filter
->
fmt_in
.
i_codec
=
infmt
->
i_format
;
p_filter
->
fmt_out
.
audio
=
*
outfmt
;
p_filter
->
fmt_out
.
audio
=
*
outfmt
;
p_filter
->
fmt_out
.
i_codec
=
outfmt
->
i_format
;
p_filter
->
fmt_out
.
i_codec
=
outfmt
->
i_format
;
p_filter
->
p_owner
=
NULL
;
if
(
infmt
->
i_format
==
outfmt
->
i_format
if
(
infmt
->
i_format
==
outfmt
->
i_format
&&
infmt
->
i_physical_channels
==
outfmt
->
i_physical_channels
&&
infmt
->
i_physical_channels
==
outfmt
->
i_physical_channels
...
@@ -202,7 +201,6 @@ void aout_FiltersDestroyPipeline( filter_t *const *filters, unsigned n )
...
@@ -202,7 +201,6 @@ void aout_FiltersDestroyPipeline( filter_t *const *filters, unsigned n )
filter_t
*
p_filter
=
filters
[
i
];
filter_t
*
p_filter
=
filters
[
i
];
module_unneed
(
p_filter
,
p_filter
->
p_module
);
module_unneed
(
p_filter
,
p_filter
->
p_module
);
free
(
p_filter
->
p_owner
);
vlc_object_release
(
p_filter
);
vlc_object_release
(
p_filter
);
}
}
}
}
...
...
src/audio_output/input.c
View file @
5b95e796
...
@@ -147,10 +147,7 @@ aout_input_t *aout_InputNew (audio_output_t * p_aout,
...
@@ -147,10 +147,7 @@ aout_input_t *aout_InputNew (audio_output_t * p_aout,
psz_parser
=
psz_next
;
psz_parser
=
psz_next
;
continue
;
continue
;
}
}
p_filter
->
p_owner
=
(
filter_owner_sys_t
*
)
p_input
;
p_filter
->
p_owner
=
malloc
(
sizeof
(
*
p_filter
->
p_owner
)
);
p_filter
->
p_owner
->
p_aout
=
p_aout
;
p_filter
->
p_owner
->
p_input
=
p_input
;
/* request format */
/* request format */
memcpy
(
&
p_filter
->
fmt_in
.
audio
,
&
chain_output_format
,
memcpy
(
&
p_filter
->
fmt_in
.
audio
,
&
chain_output_format
,
...
@@ -205,7 +202,6 @@ aout_input_t *aout_InputNew (audio_output_t * p_aout,
...
@@ -205,7 +202,6 @@ aout_input_t *aout_InputNew (audio_output_t * p_aout,
msg_Err
(
p_aout
,
"cannot add user filter %s (skipped)"
,
msg_Err
(
p_aout
,
"cannot add user filter %s (skipped)"
,
psz_parser
);
psz_parser
);
free
(
p_filter
->
p_owner
);
vlc_object_release
(
p_filter
);
vlc_object_release
(
p_filter
);
psz_parser
=
psz_next
;
psz_parser
=
psz_next
;
...
@@ -222,7 +218,6 @@ aout_input_t *aout_InputNew (audio_output_t * p_aout,
...
@@ -222,7 +218,6 @@ aout_input_t *aout_InputNew (audio_output_t * p_aout,
psz_parser
);
psz_parser
);
module_unneed
(
p_filter
,
p_filter
->
p_module
);
module_unneed
(
p_filter
,
p_filter
->
p_module
);
free
(
p_filter
->
p_owner
);
vlc_object_release
(
p_filter
);
vlc_object_release
(
p_filter
);
psz_parser
=
psz_next
;
psz_parser
=
psz_next
;
...
@@ -553,7 +548,7 @@ static vout_thread_t *RequestVout( void *p_private,
...
@@ -553,7 +548,7 @@ static vout_thread_t *RequestVout( void *p_private,
vout_thread_t
*
aout_filter_RequestVout
(
filter_t
*
p_filter
,
vout_thread_t
*
aout_filter_RequestVout
(
filter_t
*
p_filter
,
vout_thread_t
*
p_vout
,
video_format_t
*
p_fmt
)
vout_thread_t
*
p_vout
,
video_format_t
*
p_fmt
)
{
{
aout_input_t
*
p_input
=
p_filter
->
p_owner
->
p_input
;
aout_input_t
*
p_input
=
(
aout_input_t
*
)
p_filter
->
p_owner
;
aout_request_vout_t
*
p_request
=
&
p_input
->
request_vout
;
aout_request_vout_t
*
p_request
=
&
p_input
->
request_vout
;
/* XXX: this only works from audio input */
/* XXX: this only works from audio input */
...
...
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