[vlc-commits] pls: expand single use macro
Rémi Denis-Courmont
git at videolan.org
Tue Apr 18 20:55:58 CEST 2017
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Apr 17 20:02:10 2017 +0300| [140210ee3d59cb1ccbe4ac472f2e69942bb12295] | committer: Rémi Denis-Courmont
pls: expand single use macro
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=140210ee3d59cb1ccbe4ac472f2e69942bb12295
---
modules/demux/playlist/playlist.h | 4 ----
modules/demux/playlist/pls.c | 6 +++++-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/demux/playlist/playlist.h b/modules/demux/playlist/playlist.h
index b9a2129d62..9a51e504e9 100644
--- a/modules/demux/playlist/playlist.h
+++ b/modules/demux/playlist/playlist.h
@@ -90,9 +90,5 @@ do { \
DEMUX_INIT_COMMON(); \
msg_Dbg( p_demux, "%s", msg ); } while(0)
-#define CHECK_PEEK( zepeek, size ) do { \
- if( vlc_stream_Peek( p_demux->s , &zepeek, size ) < size ){ \
- msg_Dbg( p_demux, "not enough data" ); return VLC_EGENERIC; } } while(0)
-
#define POKE( peek, stuff, size ) (strncasecmp( (const char *)peek, stuff, size )==0)
diff --git a/modules/demux/playlist/pls.c b/modules/demux/playlist/pls.c
index 7664ff57fa..5de0b67165 100644
--- a/modules/demux/playlist/pls.c
+++ b/modules/demux/playlist/pls.c
@@ -47,7 +47,11 @@ int Import_PLS( vlc_object_t *p_this )
demux_t *p_demux = (demux_t *)p_this;
const uint8_t *p_peek;
CHECK_FILE();
- CHECK_PEEK( p_peek, 10 );
+
+ if( vlc_stream_Peek( p_demux->s , &p_peek, 10 ) < 10 ) {
+ msg_Dbg( p_demux, "not enough data" );
+ return VLC_EGENERIC;
+ }
if( POKE( p_peek, "[playlist]", 10 ) || POKE( p_peek, "[Reference]", 10 ) ||
demux_IsPathExtension( p_demux, ".pls" ) || demux_IsForced( p_demux, "pls" ) )
More information about the vlc-commits
mailing list