[vlc-devel] [PATCH 2/3] demux/nsv: early abort in case of unknown video + audio
Filip Roséen
filip at atch.se
Sun Nov 6 03:17:24 CET 2016
If neither video nor audio track can be played, these changes make
sure that we do not waste our breath demuxing a stream that will not
output anything.
---
modules/demux/nsv.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/demux/nsv.c b/modules/demux/nsv.c
index 8e4e73d..ef4ff44a 100644
--- a/modules/demux/nsv.c
+++ b/modules/demux/nsv.c
@@ -605,6 +605,12 @@ static int ReadNSVs( demux_t *p_demux )
}
//msg_Dbg( p_demux, " - fps=%.3f", 1000000.0 / (double)p_sys->i_pcr_inc );
+ if( p_sys->p_audio == NULL && p_sys->p_video == NULL )
+ {
+ msg_Err( p_demux, "unable to play neither audio nor video, aborting." );
+ return VLC_EGENERIC;
+ }
+
return VLC_SUCCESS;
}
--
2.10.2
More information about the vlc-devel
mailing list