# HG changeset patch # User nicodvb # Date 1142120334 0 # Node ID e2f06b46dac065bf7439abc039460f5802c6e9be # Parent 560617cdcc3b4a942d3025927ea84daa7a8ec9d3 dereference muxer->priv only after having checked muxer!=NULL in write_chunk(); closes cid 206 diff -r 560617cdcc3b -r e2f06b46dac0 libmpdemux/muxer_mpeg.c --- a/libmpdemux/muxer_mpeg.c Sat Mar 11 23:29:02 2006 +0000 +++ b/libmpdemux/muxer_mpeg.c Sat Mar 11 23:38:54 2006 +0000 @@ -327,11 +327,12 @@ static int add_frame(muxer_headers_t *spriv, uint64_t idur, uint8_t *ptr, int len, uint8_t pt, uint32_t temp_ref); static muxer_stream_t* mpegfile_new_stream(muxer_t *muxer,int type){ - muxer_priv_t *priv = (muxer_priv_t*) muxer->priv; + muxer_priv_t *priv; muxer_stream_t *s; muxer_headers_t *spriv; if (!muxer) return NULL; + priv = (muxer_priv_t*) muxer->priv; if(muxer->avih.dwStreams>=MUXER_MAX_STREAMS){ mp_msg(MSGT_MUXER, MSGL_ERR, "Too many streams! increase MUXER_MAX_STREAMS !\n"); return NULL;