[vlc-commits] Revert "lib: media_track: assert that tracks are deleted correctly"
Thomas Guillem
git at videolan.org
Wed Jun 17 10:14:48 CEST 2020
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Mon Jun 15 14:00:19 2020 +0200| [1e0933b0836a7f0d9968748382960b21aeca65cf] | committer: Thomas Guillem
Revert "lib: media_track: assert that tracks are deleted correctly"
This reverts commit e597536f311e1d7cffa0103207a2e7e3e741a606.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=1e0933b0836a7f0d9968748382960b21aeca65cf
---
lib/media_internal.h | 3 ---
lib/media_track.c | 17 ++---------------
2 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/lib/media_internal.h b/lib/media_internal.h
index 9807985179..8acb116e8f 100644
--- a/lib/media_internal.h
+++ b/lib/media_internal.h
@@ -83,9 +83,6 @@ typedef struct libvlc_media_trackpriv_t
libvlc_subtitle_track_t subtitle;
};
vlc_es_id_t *es_id;
-#ifndef NDEBUG
- bool from_list; /* true if the track is allocated from a tracklist */
-#endif
} libvlc_media_trackpriv_t;
static inline const libvlc_media_trackpriv_t *
diff --git a/lib/media_track.c b/lib/media_track.c
index 84b4b16ef0..cb0585b413 100644
--- a/lib/media_track.c
+++ b/lib/media_track.c
@@ -137,7 +137,6 @@ libvlc_media_track_release( libvlc_media_track_t *track )
{
libvlc_media_trackpriv_t *trackpriv =
container_of( track, libvlc_media_trackpriv_t, t );
- assert( !trackpriv->from_list );
libvlc_media_track_clean( track );
if( trackpriv->es_id )
vlc_es_id_Release( trackpriv->es_id );
@@ -184,13 +183,8 @@ libvlc_media_tracklist_from_es_array( es_format_t **es_array,
for( size_t i = 0; i < es_count; ++i )
{
if( es_array[i]->i_cat == cat )
- {
- libvlc_media_trackpriv_t *trackpriv = &list->tracks[count++];
- libvlc_media_trackpriv_from_es( trackpriv, es_array[i] );
-#ifndef NDEBUG
- trackpriv->from_list = true;
-#endif
- }
+ libvlc_media_trackpriv_from_es( &list->tracks[count++],
+ es_array[i] );
}
return list;
@@ -217,9 +211,6 @@ libvlc_media_track_create_from_player_track( const struct vlc_player_track *trac
if( trackpriv == NULL )
return NULL;
libvlc_media_trackpriv_from_player_track( trackpriv, track );
-#ifndef NDEBUG
- trackpriv->from_list = false;
-#endif
return &trackpriv->t;
}
@@ -243,9 +234,6 @@ libvlc_media_tracklist_from_player( vlc_player_t *player,
libvlc_media_trackpriv_t *trackpriv = &list->tracks[i];
libvlc_media_trackpriv_from_player_track( trackpriv, track );
-#ifndef NDEBUG
- trackpriv->from_list = true;
-#endif
}
return list;
@@ -270,7 +258,6 @@ libvlc_media_tracklist_delete( libvlc_media_tracklist_t *list )
for( size_t i = 0; i < list->count; ++i )
{
libvlc_media_trackpriv_t *trackpriv = &list->tracks[i];
- assert( trackpriv->from_list );
libvlc_media_track_clean( &trackpriv->t );
if( trackpriv->es_id != NULL )
More information about the vlc-commits
mailing list