[vlc-commits] demux/nsv: early abort in case of unknown video + audio
Filip Roséen
git at videolan.org
Wed Nov 16 14:27:42 CET 2016
vlc | branch: master | Filip Roséen <filip at atch.se> | Sun Nov 6 03:17:24 2016 +0100| [cea401cedda1de2971a704619a422a2032e7f97c] | committer: Jean-Baptiste Kempf
demux/nsv: early abort in case of unknown video + audio
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.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cea401cedda1de2971a704619a422a2032e7f97c
---
modules/demux/nsv.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/modules/demux/nsv.c b/modules/demux/nsv.c
index eacda5f..36715c7 100644
--- a/modules/demux/nsv.c
+++ b/modules/demux/nsv.c
@@ -595,6 +595,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;
}
More information about the vlc-commits
mailing list