[vlc-devel] [PATCH 2/6] Revert "lib: media_track: assert that tracks are deleted correctly"
Thomas Guillem
thomas at gllm.fr
Mon Jun 15 23:10:03 CEST 2020
This reverts commit e597536f311e1d7cffa0103207a2e7e3e741a606.
---
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 98079851799..8acb116e8fe 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 84b4b16ef00..cb0585b4134 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 )
--
2.20.1
More information about the vlc-devel
mailing list