summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authornicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-12 17:46:51 +0000
committernicodvb <nicodvb@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-03-12 17:46:51 +0000
commit21fda01ab7a2061e0c2413d68ef30eb92e2332b6 (patch)
tree439e092b7866cb6dd171b778a1651e7d69b09d61 /libmpdemux
parent7719914fa1cdea6e60660f66be9f28e6a26b94b5 (diff)
downloadmpv-21fda01ab7a2061e0c2413d68ef30eb92e2332b6.tar.bz2
mpv-21fda01ab7a2061e0c2413d68ef30eb92e2332b6.tar.xz
check muxer != NULL before using it; closes cid 201
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17829 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/muxer_lavf.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libmpdemux/muxer_lavf.c b/libmpdemux/muxer_lavf.c
index 88aa1dfc96..d78db13b02 100644
--- a/libmpdemux/muxer_lavf.c
+++ b/libmpdemux/muxer_lavf.c
@@ -103,12 +103,13 @@ static URLProtocol mp_protocol = {
static muxer_stream_t* lavf_new_stream(muxer_t *muxer, int type)
{
+ if(!muxer) return NULL;
muxer_priv_t *priv = (muxer_priv_t*) muxer->priv;
muxer_stream_t *stream;
muxer_stream_priv_t *spriv;
AVCodecContext *ctx;
- if(!muxer || (type != MUXER_TYPE_VIDEO && type != MUXER_TYPE_AUDIO))
+ if(type != MUXER_TYPE_VIDEO && type != MUXER_TYPE_AUDIO)
{
mp_msg(MSGT_MUXER, MSGL_ERR, "UNKNOW TYPE %d\n", type);
return NULL;