[vlc-commits] podcast: be more tolerant with faulty feeds, so just ignore invalid items instead of refusing to the list the entire feed (close #8970)

Felix Paul Kühne git at videolan.org
Tue Jul 16 14:34:59 CEST 2013


vlc/vlc-2.1 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Jul 15 11:43:41 2013 +0200| [5136b6f90da449e3614451d8f14218f0a42f1bd2] | committer: Jean-Baptiste Kempf

podcast: be more tolerant with faulty feeds, so just ignore invalid items instead of refusing to the list the entire feed (close #8970)

(cherry picked from commit 06112acd9977528ce7d0874de5456158b7916c81)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.1.git/?a=commit;h=5136b6f90da449e3614451d8f14218f0a42f1bd2
---

 modules/demux/playlist/podcast.c |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/modules/demux/playlist/podcast.c b/modules/demux/playlist/podcast.c
index 022b87b..6af712b 100644
--- a/modules/demux/playlist/podcast.c
+++ b/modules/demux/playlist/podcast.c
@@ -230,8 +230,24 @@ static int Demux( demux_t *p_demux )
                 {
                     if( psz_item_mrl == NULL )
                     {
-                        msg_Err( p_demux, "invalid XML (no enclosure markup)" );
-                        goto error;
+                        if (psz_item_name)
+                            msg_Warn( p_demux, "invalid XML item, skipping %s",
+                                      psz_item_name );
+                        else
+                            msg_Warn( p_demux, "invalid XML item, skipped" );
+                        FREENULL( psz_item_name );
+                        FREENULL( psz_item_size );
+                        FREENULL( psz_item_type );
+                        FREENULL( psz_item_date );
+                        FREENULL( psz_item_author );
+                        FREENULL( psz_item_category );
+                        FREENULL( psz_item_duration );
+                        FREENULL( psz_item_keywords );
+                        FREENULL( psz_item_subtitle );
+                        FREENULL( psz_item_summary );
+                        FREENULL( psz_art_url );
+                        FREENULL( psz_elname );
+                        continue;
                     }
 
                     p_input = input_item_New( psz_item_mrl, psz_item_name );



More information about the vlc-commits mailing list