mirror of
https://github.com/mpv-player/mpv
synced 2024-12-16 03:45:23 +00:00
check muxer != NULL before using it; closes cid 201
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@17829 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
7719914fa1
commit
21fda01ab7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user