Changeset 7e501d16ee2d458990cf27ac7d332572c91df856
- Timestamp:
- 07/06/07 19:22:05
(1 year ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1181236925 +0000
- git-parent:
[19cc11fe0ed03ab20c1cc13cbc3c1020b574e31f]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1181236925 +0000
- Message:
- Avoid a bunch of dummy string copy
- Use strdup() instead of asprintf("%s")
- Fix format string (CDDB now owns your CD player)
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re7a8394 |
r7e501d1 |
|
| 415 | 415 | |
|---|
| 416 | 416 | p_item_in_category = playlist_ItemToNode( p_playlist, p_parent, VLC_FALSE ); |
|---|
| 417 | | psz_name = strdup( "Audio CD" ); |
|---|
| 418 | 417 | vlc_mutex_lock( &p_playlist->object_lock ); |
|---|
| 419 | | playlist_ItemSetName( p_parent, psz_name ); |
|---|
| | 418 | playlist_ItemSetName( p_parent, "Audio CD" ); |
|---|
| 420 | 419 | vlc_mutex_unlock( &p_playlist->object_lock ); |
|---|
| 421 | 420 | var_SetInteger( p_playlist, "item-change", p_parent->p_input->i_id ); |
|---|
| 422 | | free( psz_name ); |
|---|
| 423 | 421 | |
|---|
| 424 | 422 | #ifdef HAVE_LIBCDDB |
|---|
| … | … | |
| 428 | 426 | if( cddb_disc_get_title( p_sys->p_disc ) ) |
|---|
| 429 | 427 | { |
|---|
| 430 | | asprintf( &psz_name, "%s", cddb_disc_get_title( p_sys->p_disc ) ); |
|---|
| | 428 | const char *psz_name = cddb_disc_get_title( p_sys->p_disc ); |
|---|
| 431 | 429 | vlc_mutex_lock( &p_playlist->object_lock ); |
|---|
| 432 | 430 | playlist_ItemSetName( p_parent, psz_name ); |
|---|
| … | … | |
| 434 | 432 | var_SetInteger( p_playlist, "item-change", |
|---|
| 435 | 433 | p_parent->p_input->i_id ); |
|---|
| 436 | | free( psz_name ); |
|---|
| 437 | 434 | } |
|---|
| 438 | 435 | } |
|---|
| … | … | |
| 485 | 482 | input_ItemAddInfo( p_input_item, _(VLC_META_INFO_CAT), |
|---|
| 486 | 483 | _(VLC_META_TITLE), |
|---|
| 487 | | cddb_track_get_title( t ) ); |
|---|
| | 484 | "%s", cddb_track_get_title( t ) ); |
|---|
| 488 | 485 | if( p_input_item->psz_name ) |
|---|
| 489 | 486 | free( p_input_item->psz_name ); |
|---|
| 490 | | asprintf( &p_input_item->psz_name, "%s", |
|---|
| 491 | | cddb_track_get_title( t ) ); |
|---|
| | 487 | p_input_item->psz_name = strdup( cddb_track_get_title( t ) ); |
|---|
| 492 | 488 | } |
|---|
| 493 | 489 | psz_result = cddb_track_get_artist( t ); |
|---|
| … | … | |
| 495 | 491 | { |
|---|
| 496 | 492 | input_ItemAddInfo( p_input_item, _(VLC_META_INFO_CAT), |
|---|
| 497 | | _(VLC_META_ARTIST), psz_result ); |
|---|
| | 493 | _(VLC_META_ARTIST), "%s", psz_result ); |
|---|
| 498 | 494 | } |
|---|
| 499 | 495 | } |
|---|