]> git.sesse.net Git - vlc/commitdiff
ts: dvbpsi: don't spam with irrelevant errors
authorFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 16 Mar 2015 16:11:40 +0000 (17:11 +0100)
committerFrancois Cartegnie <fcvlcdev@free.fr>
Mon, 16 Mar 2015 16:12:52 +0000 (17:12 +0100)
should be fixed from libdvbpsi >= 1.2.0

modules/mux/mpeg/dvbpsi_compat.h

index f58458b4b4f0298478d223b5ed7714281cbc0781..1921cf208d7324e02ce1e964eaf66ca0018b2f35 100644 (file)
@@ -30,7 +30,15 @@ static inline void dvbpsi_messages(dvbpsi_t *p_dvbpsi, const dvbpsi_msg_level_t
     /* See dvbpsi.h for the definition of these log levels.*/
     switch(level)
     {
-        case DVBPSI_MSG_ERROR: msg_Err( obj, "%s", msg ); break;
+        case DVBPSI_MSG_ERROR:
+        {
+#if DVBPSI_VERSION_INT <= ((1 << 16) + (2 << 8))
+            if( strncmp( msg, "libdvbpsi (PMT decoder): ", 25 ) ||
+                ( strncmp( &msg[25], "invalid section", 15 ) &&
+                  strncmp( &msg[25], "'program_number' don't match", 28 ) ) )
+#endif
+            msg_Err( obj, "%s", msg ); break;
+        }
         case DVBPSI_MSG_WARN:  msg_Warn( obj, "%s", msg ); break;
         case DVBPSI_MSG_NONE:
         case DVBPSI_MSG_DEBUG: