[vlc-commits] Revert "src/input: add a new input option flag to replace values of existing options"
David Fuhrmann
git at videolan.org
Thu May 22 11:13:21 CEST 2014
vlc | branch: master | David Fuhrmann <dfuhrmann at videolan.org> | Thu May 22 11:10:05 2014 +0200| [5beb533ff08fba74bb26fdb3bf335210cbb4b0d4] | committer: David Fuhrmann
Revert "src/input: add a new input option flag to replace values of existing options"
This code was superseded by another approach and is not used anymore.
This reverts commit ba82f10c7108719e85413ee518e53249a549db85.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5beb533ff08fba74bb26fdb3bf335210cbb4b0d4
---
include/vlc_input_item.h | 7 -------
src/input/item.c | 22 ----------------------
2 files changed, 29 deletions(-)
diff --git a/include/vlc_input_item.h b/include/vlc_input_item.h
index 977b1a7..bc5b2e5 100644
--- a/include/vlc_input_item.h
+++ b/include/vlc_input_item.h
@@ -179,13 +179,6 @@ enum input_item_option_e
/* Add the option, unless the same option
* is already present. */
VLC_INPUT_OPTION_UNIQUE = 0x100,
-
- /* Search for an existing option in the format
- * option=value and replaces the first one found.
- * Else, the new option is added.
- * This option and VLC_INPUT_OPTION_UNIQUE are
- * mutually exclusive. */
- VLC_INPUT_OPTION_REPLACE = 0x200,
};
/**
diff --git a/src/input/item.c b/src/input/item.c
index 30c6d3a..b27250b 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -473,28 +473,6 @@ int input_item_AddOption( input_item_t *p_input, const char *psz_option,
goto out;
}
- if (flags & VLC_INPUT_OPTION_REPLACE)
- {
- /* search for option format "option=value" */
-
- const char *psz_found = strchr( psz_option, '=' );
- if( likely( psz_found ) )
- {
- for( int i = 0 ; i < p_input->i_options; i++ )
- {
- if( !strncmp( p_input->ppsz_options[i], psz_option,
- psz_found - psz_option + 1 /* = */ ) )
- {
- free( p_input->ppsz_options[i] );
- p_input->ppsz_options[i] = strdup( psz_option );
-
- goto out;
- }
- }
- }
-
- }
-
uint8_t *flagv = realloc (p_input->optflagv, p_input->optflagc + 1);
if (flagv == NULL)
{
More information about the vlc-commits
mailing list