Commit a40eb079 authored by Tristan Matthews's avatar Tristan Matthews

rtp: jpeg: fix memory leaks

(cherry picked from commit cbcbd32c1e62235877288bc0e0b54aad400a305f)
parent ce3de59f
......@@ -1569,11 +1569,14 @@ static int rtp_packetize_jpeg( sout_stream_id_sys_t *id, block_t *in )
int i_payload = __MIN( i_data, (int)(rtp_mtu (id) - hdr_size) );
if ( i_payload <= 0 )
return VLC_EGENERIC;
goto error;
block_t *out = block_Alloc( 12 + hdr_size + i_payload );
if( out == NULL )
{
block_Release( in );
return VLC_ENOMEM;
}
uint8_t *p = out->p_buffer + 12;
/* set main header */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment