[vlc-devel] commit: Use objet pointer as unique ID (plugins) ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Sep 20 16:25:55 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Sep 20 16:50:43 2008 +0300| [670651eeeb78021b18d936ef2eac88ef706d9ffb] | committer: Rémi Denis-Courmont
Use objet pointer as unique ID (plugins)
(By the way, snapshot-id looks like a write only variable...)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=670651eeeb78021b18d936ef2eac88ef706d9ffb
---
modules/access_filter/timeshift.c | 4 ++--
modules/misc/dummy/decoder.c | 2 +-
modules/video_output/snapshot.c | 10 +++++-----
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/modules/access_filter/timeshift.c b/modules/access_filter/timeshift.c
index 02fae43..2c0082e 100644
--- a/modules/access_filter/timeshift.c
+++ b/modules/access_filter/timeshift.c
@@ -604,8 +604,8 @@ static char *GetTmpFilePath( access_t *p_access )
#endif
}
- if( asprintf( &psz_filename_base, "%s/vlc-timeshift-%d-%d-",
- psz_dir, getpid(), p_access->i_object_id ) == -1 )
+ if( asprintf( &psz_filename_base, "%s/vlc-timeshift-%d-%p-",
+ psz_dir, getpid(), p_access ) == -1 )
psz_filename_base = NULL;
free( psz_dir );
diff --git a/modules/misc/dummy/decoder.c b/modules/misc/dummy/decoder.c
index d02ae31..732008c 100644
--- a/modules/misc/dummy/decoder.c
+++ b/modules/misc/dummy/decoder.c
@@ -82,7 +82,7 @@ int OpenDecoder ( vlc_object_t *p_this )
return VLC_EGENERIC;
}
- sprintf( psz_file, "stream.%i", p_dec->i_object_id );
+ snprintf( psz_file, sizeof( psz_file), "stream.%p", p_dec );
#ifndef UNDER_CE
var_Create( p_dec, "dummy-save-es", VLC_VAR_BOOL | VLC_VAR_DOINHERIT );
diff --git a/modules/video_output/snapshot.c b/modules/video_output/snapshot.c
index fb0b9cf..a37ac2d 100644
--- a/modules/video_output/snapshot.c
+++ b/modules/video_output/snapshot.c
@@ -301,18 +301,18 @@ static int Init( vout_thread_t *p_vout )
if( var_Create( p_vout->p_sys->p_input, "snapshot-id", VLC_VAR_INTEGER ) )
{
- msg_Err( p_vout, "Cannot create snapshot-id variable in p_input (%d).",
- p_vout->p_sys->p_input->i_object_id );
+ msg_Err( p_vout, "Cannot create snapshot-id variable in p_input(%p).",
+ p_vout->p_sys->p_input );
return VLC_EGENERIC;
}
/* Register the snapshot vout module at the input level */
- val.i_int = p_vout->i_object_id;
+ val.p_address = p_vout;
if( var_Set( p_vout->p_sys->p_input, "snapshot-id", val ) )
{
- msg_Err( p_vout, "Cannot register snapshot-id in p_input (%d).",
- p_vout->p_sys->p_input->i_object_id );
+ msg_Err( p_vout, "Cannot register snapshot-id in p_input(%p).",
+ p_vout->p_sys->p_input );
return VLC_EGENERIC;
}
More information about the vlc-devel
mailing list