Commit 765e9325 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

sccanf supports %p, use it instead of hacky %ju

parent 116fe975
...@@ -86,7 +86,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self, ...@@ -86,7 +86,7 @@ mediacontrol_snapshot( mediacontrol_Instance *self,
vlc_object_release( p_input ); vlc_object_release( p_input );
RAISE_NULL( mediacontrol_InternalException, "Out of memory" ); RAISE_NULL( mediacontrol_InternalException, "Out of memory" );
} }
snprintf( path, 255, "object:%ju", (uintmax_t)(uintptr_t)p_cache ); snprintf( path, 255, "object:%p", p_cache );
var_SetString( p_vout, "snapshot-path", path ); var_SetString( p_vout, "snapshot-path", path );
var_SetString( p_vout, "snapshot-format", "png" ); var_SetString( p_vout, "snapshot-format", "png" );
......
...@@ -568,13 +568,13 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -568,13 +568,13 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
DIR *path; DIR *path;
int i_ret; int i_ret;
bool b_embedded_snapshot; bool b_embedded_snapshot;
uintmax_t i_id = (uintptr_t)NULL; void *p_obj;
/* */ /* */
val.psz_string = var_GetNonEmptyString( p_vout, "snapshot-path" ); val.psz_string = var_GetNonEmptyString( p_vout, "snapshot-path" );
/* Embedded snapshot : if snapshot-path == object:object_ptr */ /* Embedded snapshot : if snapshot-path == object:object_ptr */
if( val.psz_string && sscanf( val.psz_string, "object:%ju", &i_id ) > 0 ) if( val.psz_string && sscanf( val.psz_string, "object:%p", &p_obj ) > 0 )
b_embedded_snapshot = true; b_embedded_snapshot = true;
else else
b_embedded_snapshot = false; b_embedded_snapshot = false;
...@@ -634,7 +634,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic ) ...@@ -634,7 +634,7 @@ int vout_Snapshot( vout_thread_t *p_vout, picture_t *p_pic )
*/ */
if( b_embedded_snapshot ) if( b_embedded_snapshot )
{ {
vlc_object_t* p_dest = (vlc_object_t *)(uintptr_t)i_id; vlc_object_t* p_dest = p_obj;
block_t *p_block; block_t *p_block;
snapshot_t *p_snapshot; snapshot_t *p_snapshot;
size_t i_size; size_t i_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment