]> git.sesse.net Git - mlt/commitdiff
Fix crash on audio only clip using uninialized mutex.
authorDan Dennedy <dan@dennedy.org>
Sat, 25 Jan 2014 06:58:11 +0000 (22:58 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 25 Jan 2014 06:58:11 +0000 (22:58 -0800)
This was reproducible on Windows using winpthreads, which apparently
does not gracefully handle calls on uninitialized mutexes.

src/modules/avformat/producer_avformat.c

index 4fc105230ef2969e00cf842880054757d245a57c..cbdd38fd670485c9a6c8987899c6bd2d9b872d19 100644 (file)
@@ -1949,7 +1949,7 @@ static void producer_set_up_video( producer_avformat self, mlt_frame frame )
        }
 
        // Update the video properties if the index changed
-       if ( index != self->video_index )
+       if ( context && index > -1 && index != self->video_index )
        {
                // Reset the video properties if the index changed
                self->video_index = index;