From: Fiona Glaser Date: Sat, 8 Aug 2009 18:26:36 +0000 (-0700) Subject: Fix MP4 output (bug in malloc checking patch) X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4cbc551150f9649b2e636e433af2204d353b3bc9;p=libx264 Fix MP4 output (bug in malloc checking patch) --- diff --git a/muxers.c b/muxers.c index ef2f5ff1..5c74f132 100644 --- a/muxers.c +++ b/muxers.c @@ -747,7 +747,7 @@ int write_nalu_mp4( hnd_t handle, uint8_t *p_nalu, int i_size ) return -1; p_slot->size = i_size - 4; p_slot->data = (char *)malloc(p_slot->size); - if( p_slot->data ) + if( !p_slot->data ) return -1; memcpy(p_slot->data, p_nalu + 4, i_size - 4); gf_list_add(p_mp4->p_config->sequenceParameterSets, p_slot);