[vlc-commits] preparser: don't send vlc_InputItemPreparsedChanged in case of failure
Thomas Guillem
git at videolan.org
Sun Apr 17 07:22:31 CEST 2016
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Thu Apr 14 15:20:59 2016 +0200| [d68541a9a0fcc3538b58a9091a57cc6603cf645b] | committer: Thomas Guillem
preparser: don't send vlc_InputItemPreparsedChanged in case of failure
The vlc_InputItemPreparseEnded event should be enough.
There is a compat code inside libvlc in order to don't break old API that are
waiting for a libvlc_MediaParsedChanged, even in case of error.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d68541a9a0fcc3538b58a9091a57cc6603cf645b
---
lib/media.c | 5 +++++
src/playlist/preparser.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/lib/media.c b/lib/media.c
index e0a5423..f3259ea 100644
--- a/lib/media.c
+++ b/lib/media.c
@@ -265,6 +265,11 @@ static void input_item_preparse_ended( const vlc_event_t * p_event,
libvlc_media_list_internal_end_reached( p_subitems );
libvlc_media_list_unlock( p_subitems );
}
+
+ /* XXX: libVLC 2.2.0 compat: even if case of preparse failure,
+ * libvlc_MediaParsedChanged was sent with a true status. Therefore, send
+ * this event if it was not previously sent */
+ send_preparsed_event(p_md);
}
/**************************************************************************
diff --git a/src/playlist/preparser.c b/src/playlist/preparser.c
index 2870875..e0f6aa8 100644
--- a/src/playlist/preparser.c
+++ b/src/playlist/preparser.c
@@ -201,9 +201,9 @@ static void Preparse( playlist_preparser_t *preparser, input_item_t *p_item,
input_Close( input );
var_SetAddress( preparser->object, "item-change", p_item );
+ input_item_SetPreparsed( p_item, true );
}
- input_item_SetPreparsed( p_item, true );
input_item_SignalPreparseEnded( p_item );
}
More information about the vlc-commits
mailing list