riff.cc: Initialize data in constructor

Fixes Coverity CID 709444: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member ""length"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""name"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""offset"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""parent"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""type"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""written"" is not initialized in this constructor nor in any functions that it calls.
riff.cc: Fail if lseek() fails

Fixes Coverity CID 709362: Argument cannot be negative (NEGATIVE_RETURNS)
Function "lseek(this->fd, 0LL, 0)" returns a negative number.
Assigning: signed variable "pos" = "lseek".
...
"pos" is passed to a parameter that cannot be negative.
548                fail_if( lseek( fd, pos, SEEK_SET ) == ( off_t ) - 1 );
mlt_cache.c: check for null pointer

Fixes CID 709392: Dereference before null check (REVERSE_INULL).
mlt_cache.c: watch out for null pointer

Fixes Coverity CID 709346: Dereference after null check (FORWARD_NULL)
Comparing "result" to null implies that "result" might be null.
449                if ( result && result->data )
450                        result->refcount++;
Dereferencing null variable "result".
451                mlt_log( NULL, MLT_LOG_DEBUG, "%s: get %d = %p, %p\n", __FUNCTION__, cache->count - 1, *hit, result->data );
452
mlt_consumer.c: watch out for null pointer

Fixes Coverity CID 709393: Dereference before null check (REVERSE_INULL)
Directly dereferencing pointer "profile".
 235                profile->sample_aspect_num = mlt_properties_get_int( properties, "sample_aspect_num" );
Dereferencing "profile" before a null check.
 236                if ( profile )
mlt_consumer_new(): handle return value from mlt_consumer_init()

If init() fails return NULL. Fixes Coverity CID 709325.

At conditional (1): "self != NULL" taking the true branch.
 339        if ( self != NULL )
CID 709325: Unchecked return value (CHECKED_RETURN)
Calling function "mlt_consumer_init" without checking return value (as is done elsewhere 10 out of 11 times).
No check of the return value of "mlt_consumer_init(self, NULL, profile)".
 340                mlt_consumer_init( self, NULL, profile );
mlt_consumer_start(): get mutex before accessing put_active

Fixes Coverity CID 709355: Data race condition (MISSING_LOCK)
Accessing variable "self->put_active" (mlt_consumer_s.put_active) requires the mlt_consumer_s.put_mutex lock.
 411        self->put_active = 1;
mlt_consumer_start(): check return value from mlt_properties_get_int()

Fixes Coverity CID 709343: Division or modulo by zero (DIVIDE_BY_ZERO)
Division by expression "mlt_properties_get_int(properties, "frame_rate_num")" which may be zero has undefined behavior
On this path, function call "mlt_properties_get_int(properties, "frame_rate_num")" has return value of 0
 442        int frame_duration = 1000000 / mlt_properties_get_int( properties, "frame_rate_num" ) *
 443                        mlt_properties_get_int( properties, "frame_rate_den" );
Merge pull request #4 from mcfrisk/coverity

A few Coverity fixes