]> git.sesse.net Git - mlt/log
mlt
11 years agofix array index out of range
Maksym Veremeyenko [Fri, 28 Sep 2012 14:24:05 +0000 (16:24 +0200)]
fix array index out of range

11 years agofix first few frames with "aspect" property on avformat consumer
Dan Dennedy [Tue, 25 Sep 2012 05:09:03 +0000 (22:09 -0700)]
fix first few frames with "aspect" property on avformat consumer

11 years agofix yadif deinterlacer on streams with progressive & interlace
Dan Dennedy [Tue, 25 Sep 2012 04:20:37 +0000 (21:20 -0700)]
fix yadif deinterlacer on streams with progressive & interlace

11 years agofix hang/crash using yadif deinterlace with image producer
Dan Dennedy [Tue, 25 Sep 2012 04:02:16 +0000 (21:02 -0700)]
fix hang/crash using yadif deinterlace with image producer

11 years agofix build against libav master
Dan Dennedy [Sun, 23 Sep 2012 23:39:25 +0000 (16:39 -0700)]
fix build against libav master

11 years agoindicate in some presets codecs which do not support multithread
Dan Dennedy [Sun, 23 Sep 2012 17:39:15 +0000 (10:39 -0700)]
indicate in some presets codecs which do not support multithread

11 years agofix letting xml playlist load like virtual clip
Dan Dennedy [Sat, 22 Sep 2012 20:53:04 +0000 (13:53 -0700)]
fix letting xml playlist load like virtual clip

If an application wants to detect if deserialized XML is a playlist or
mulitrack project, then it can check the new _original_type and
_original_resource properties.

11 years agofix crash on melt pango:+foo (without .txt)
Dan Dennedy [Sat, 22 Sep 2012 20:28:48 +0000 (13:28 -0700)]
fix crash on melt pango:+foo (without .txt)

11 years agofix pango producer in XML with no resource filename
Dan Dennedy [Sat, 22 Sep 2012 20:27:02 +0000 (13:27 -0700)]
fix pango producer in XML with no resource filename

11 years agofix crash in pixbuf producer (kdenlive-2747)
j-b-m [Sat, 22 Sep 2012 18:48:06 +0000 (11:48 -0700)]
fix crash in pixbuf producer (kdenlive-2747)

11 years agofix regression due to not setting resource property in some contexts
Dan Dennedy [Thu, 20 Sep 2012 05:50:50 +0000 (22:50 -0700)]
fix regression due to not setting resource property in some contexts

11 years agofix build due to removal of deprecated encode() from AVCodec
Dan Dennedy [Wed, 19 Sep 2012 17:02:28 +0000 (10:02 -0700)]
fix build due to removal of deprecated encode() from AVCodec

11 years agofix image corruption with uncompressed video
Dan Dennedy [Sun, 16 Sep 2012 21:00:05 +0000 (14:00 -0700)]
fix image corruption with uncompressed video

11 years agocleanup sys/param.h include on FreeBSD
Dan Dennedy [Sun, 16 Sep 2012 18:54:57 +0000 (11:54 -0700)]
cleanup sys/param.h include on FreeBSD

Assisted by Albert Villa who says it is safe to assume sys/param.h is
available, which is needed for FreeBSD version check on whether to
include xlocale.h in mlt_property.h.

11 years agobetter deinterlace regression fix
Dan Dennedy [Sun, 16 Sep 2012 18:32:25 +0000 (11:32 -0700)]
better deinterlace regression fix

Sorry for the noise, but this is a better fix for the regression because
it does not manipulate the image stack the way the regression and its
first fix did.

11 years agofix regression on deinterlace in a multitrack with tractor
Dan Dennedy [Sun, 16 Sep 2012 18:21:54 +0000 (11:21 -0700)]
fix regression on deinterlace in a multitrack with tractor

11 years agorevert setting mlt_image_format to yuv420p
Dan Dennedy [Fri, 14 Sep 2012 17:54:59 +0000 (10:54 -0700)]
revert setting mlt_image_format to yuv420p

11 years agoRevert "change sdl consumer to use yuv420p"
Dan Dennedy [Fri, 14 Sep 2012 15:55:02 +0000 (08:55 -0700)]
Revert "change sdl consumer to use yuv420p"

This reverts commit ac034ef73a340fe3402968a7b3a3f69de4a3c53a.

Conflicts:
src/modules/sdl/consumer_sdl.c

11 years agoremove unnecessary image conversion in deinterlace (kdenlive-2727)
Dan Dennedy [Fri, 14 Sep 2012 05:44:43 +0000 (22:44 -0700)]
remove unnecessary image conversion in deinterlace (kdenlive-2727)

11 years agosdl_audio and sdl_preview also do not care about field order
Dan Dennedy [Fri, 14 Sep 2012 05:27:57 +0000 (22:27 -0700)]
sdl_audio and sdl_preview also do not care about field order

Also, have sdl_preview pass top_field_first to its children.

11 years agoadd ability to ignore field order as used by sdl consumer
Dan Dennedy [Fri, 14 Sep 2012 04:52:02 +0000 (21:52 -0700)]
add ability to ignore field order as used by sdl consumer

11 years agochange sdl consumer to use yuv420p
Dan Dennedy [Fri, 14 Sep 2012 03:43:47 +0000 (20:43 -0700)]
change sdl consumer to use yuv420p

based on a patch by Steinar Gunderson

11 years agoreplace this with frame and filter
Dan Dennedy [Thu, 13 Sep 2012 17:00:35 +0000 (10:00 -0700)]
replace this with frame and filter

11 years agofix incorrect pointer comparisons in legacy code
Dan Dennedy [Thu, 13 Sep 2012 05:04:48 +0000 (22:04 -0700)]
fix incorrect pointer comparisons in legacy code

Reported by Steinar Gunderson

11 years agoadd Mlt::Profile::colorspace()
Dan Dennedy [Mon, 10 Sep 2012 00:31:10 +0000 (17:31 -0700)]
add Mlt::Profile::colorspace()

11 years agoallow env CC to override hard-coded gcc in configure scripts
Dan Dennedy [Sun, 9 Sep 2012 05:15:38 +0000 (22:15 -0700)]
allow env CC to override hard-coded gcc in configure scripts

patch by Alberto Villa

11 years agofix frame cache to use the original producer position (kdenlive-2668)
Dan Dennedy [Sun, 9 Sep 2012 05:05:55 +0000 (22:05 -0700)]
fix frame cache to use the original producer position (kdenlive-2668)

11 years agochange producers to use mlt_frame_original_position()
Dan Dennedy [Sun, 9 Sep 2012 05:05:35 +0000 (22:05 -0700)]
change producers to use mlt_frame_original_position()

11 years agoadd mlt_frame_original_position()
Dan Dennedy [Sun, 9 Sep 2012 03:53:44 +0000 (20:53 -0700)]
add mlt_frame_original_position()

11 years agoxlocale was backported to FreeBSD 9-STABLE
Dan Dennedy [Sun, 9 Sep 2012 02:32:22 +0000 (19:32 -0700)]
xlocale was backported to FreeBSD 9-STABLE

Patch by Alberto Villa

11 years agoMerge pull request #11 from gmarco/changes
Dan Dennedy [Fri, 7 Sep 2012 04:59:46 +0000 (21:59 -0700)]
Merge pull request #11 from gmarco/changes

fix possible segfault on borders, used >= for

11 years agofix possible segfault on borders, used >= for
Marco Gittler [Wed, 5 Sep 2012 17:46:48 +0000 (19:46 +0200)]
fix possible segfault on borders, used >= for
better readablility

11 years agofix synchronizing consumer properties with the profile
Dan Dennedy [Tue, 4 Sep 2012 06:44:03 +0000 (23:44 -0700)]
fix synchronizing consumer properties with the profile

If you change the profile struct then you can stop and restart the
consumer for the changes to take affect. Previously, you had to close
the consumer and re-open it.

11 years agoadd Mlt::Service::set_profile()
Dan Dennedy [Tue, 4 Sep 2012 06:11:39 +0000 (23:11 -0700)]
add Mlt::Service::set_profile()

11 years agoadd mlt_service_set_profile()
Dan Dennedy [Tue, 4 Sep 2012 06:11:08 +0000 (23:11 -0700)]
add mlt_service_set_profile()

11 years agoadd Mlt::Profile::is_explicit()
Dan Dennedy [Tue, 4 Sep 2012 02:24:10 +0000 (19:24 -0700)]
add Mlt::Profile::is_explicit()

11 years agofix 100% opacity to be truly opaque (kdenlive-2708)
j-b-m [Tue, 4 Sep 2012 02:01:36 +0000 (19:01 -0700)]
fix 100% opacity to be truly opaque (kdenlive-2708)

11 years agocleanup doc for consumer-frame-render and -show event transmitters
Dan Dennedy [Fri, 31 Aug 2012 18:55:17 +0000 (11:55 -0700)]
cleanup doc for consumer-frame-render and -show event transmitters

11 years agoextend Ruby API with PlaylistNextListner and show how to use it
Dan Dennedy [Fri, 31 Aug 2012 18:54:19 +0000 (11:54 -0700)]
extend Ruby API with PlaylistNextListner and show how to use it

11 years agoadd playlist-next event to mlt_playlist
Dan Dennedy [Fri, 31 Aug 2012 18:52:56 +0000 (11:52 -0700)]
add playlist-next event to mlt_playlist

11 years agoset interim version to 0.8.3
Dan Dennedy [Fri, 31 Aug 2012 03:42:53 +0000 (20:42 -0700)]
set interim version to 0.8.3

11 years agoupdate ChangeLog for v0.8.2
Dan Dennedy [Tue, 28 Aug 2012 14:37:22 +0000 (07:37 -0700)]
update ChangeLog for v0.8.2

11 years agoadd acodec to webm preset and rename MPEG-4 ASP preset
Dan Dennedy [Tue, 28 Aug 2012 16:25:41 +0000 (09:25 -0700)]
add acodec to webm preset and rename MPEG-4 ASP preset

11 years agoset version to 0.8.2
Dan Dennedy [Tue, 28 Aug 2012 14:36:29 +0000 (07:36 -0700)]
set version to 0.8.2

11 years agochange recommended versions of ffmpeg/libav
Dan Dennedy [Tue, 28 Aug 2012 14:35:42 +0000 (07:35 -0700)]
change recommended versions of ffmpeg/libav

11 years agoadd release notes for v0.8.2
Dan Dennedy [Tue, 28 Aug 2012 14:33:10 +0000 (07:33 -0700)]
add release notes for v0.8.2

11 years agoadd meta.preset.extension to image sequence presets
Dan Dennedy [Mon, 27 Aug 2012 00:25:22 +0000 (17:25 -0700)]
add meta.preset.extension to image sequence presets

11 years agoadd preset metadata such as alternate name, filename extension, note.
Dan Dennedy [Mon, 27 Aug 2012 00:21:03 +0000 (17:21 -0700)]
add preset metadata such as alternate name, filename extension, note.

11 years agochange profile to vprofile in presets
Dan Dennedy [Sun, 26 Aug 2012 21:21:32 +0000 (14:21 -0700)]
change profile to vprofile in presets

11 years agoadd vorbis and prores encode presets
Dan Dennedy [Sun, 26 Aug 2012 21:21:00 +0000 (14:21 -0700)]
add vorbis and prores encode presets

11 years agoadd a bunch of new encoding presets
Dan Dennedy [Sun, 26 Aug 2012 03:24:39 +0000 (20:24 -0700)]
add a bunch of new encoding presets

11 years agofix seeking on some formats (HDV) after a/v sync improvements
Dan Dennedy [Sat, 25 Aug 2012 19:42:27 +0000 (12:42 -0700)]
fix seeking on some formats (HDV) after a/v sync improvements

11 years agothe recent A/V sync overhaul needed some additional work
Dan Dennedy [Sat, 25 Aug 2012 05:07:22 +0000 (22:07 -0700)]
the recent A/V sync overhaul needed some additional work

11 years agoUpdate src/modules/avformat/producer_avformat.c
Brian Matherly [Tue, 21 Aug 2012 02:10:22 +0000 (21:10 -0500)]
Update src/modules/avformat/producer_avformat.c

Better way to detect the availability of PIX_FMT_YUVA444P.

11 years agofix melt.c build on windows due to previous commit
Dan Dennedy [Mon, 20 Aug 2012 16:49:52 +0000 (09:49 -0700)]
fix melt.c build on windows due to previous commit

11 years agofix build on ffmpeg v0.5 (no CODEC_ID_VP8)
Dan Dennedy [Mon, 20 Aug 2012 03:51:52 +0000 (20:51 -0700)]
fix build on ffmpeg v0.5 (no CODEC_ID_VP8)

11 years agoremove printf added in previous commit
Dan Dennedy [Mon, 20 Aug 2012 02:27:16 +0000 (19:27 -0700)]
remove printf added in previous commit

11 years agofix possible null pointer with strdup()
Dan Dennedy [Sun, 19 Aug 2012 20:24:30 +0000 (13:24 -0700)]
fix possible null pointer with strdup()

11 years agolet melt be stopped gracefully by signal
Dan Dennedy [Sun, 19 Aug 2012 19:49:11 +0000 (12:49 -0700)]
let melt be stopped gracefully by signal

11 years agowebm works better with use_pts=1 as well (3559115)
Dan Dennedy [Sat, 18 Aug 2012 06:53:26 +0000 (23:53 -0700)]
webm works better with use_pts=1 as well (3559115)

11 years agofix null pointer check (coverity-709396)
Dan Dennedy [Fri, 17 Aug 2012 07:14:45 +0000 (00:14 -0700)]
fix null pointer check (coverity-709396)

11 years agofix possible null pointer dereference (coverity-714581)
Dan Dennedy [Fri, 17 Aug 2012 07:05:27 +0000 (00:05 -0700)]
fix possible null pointer dereference (coverity-714581)

11 years agofix possible null pointer dereferences (coverity-714581)
Dan Dennedy [Fri, 17 Aug 2012 06:50:30 +0000 (23:50 -0700)]
fix possible null pointer dereferences (coverity-714581)

11 years agofix possible null pointer dereference (coverity-714580)
Dan Dennedy [Fri, 17 Aug 2012 06:46:42 +0000 (23:46 -0700)]
fix possible null pointer dereference (coverity-714580)

11 years agofix possible null pointer dereference (coverity-710882)
Dan Dennedy [Fri, 17 Aug 2012 06:40:57 +0000 (23:40 -0700)]
fix possible null pointer dereference (coverity-710882)

11 years agofix possible null pointer dereference (coverity-710870)
Dan Dennedy [Fri, 17 Aug 2012 06:32:04 +0000 (23:32 -0700)]
fix possible null pointer dereference (coverity-710870)

11 years agofix possible null pointer dereferences (coverity-709399)
Dan Dennedy [Fri, 17 Aug 2012 06:29:49 +0000 (23:29 -0700)]
fix possible null pointer dereferences (coverity-709399)

11 years agofix possible null pointer dereferences (coverity-709395)
Dan Dennedy [Fri, 17 Aug 2012 06:27:35 +0000 (23:27 -0700)]
fix possible null pointer dereferences (coverity-709395)

11 years agofix possible null pointer dereference (coverity-709394)
Dan Dennedy [Fri, 17 Aug 2012 06:26:18 +0000 (23:26 -0700)]
fix possible null pointer dereference (coverity-709394)

11 years agofix possible null pointer dereference (coverity-709393)
Dan Dennedy [Fri, 17 Aug 2012 06:24:43 +0000 (23:24 -0700)]
fix possible null pointer dereference (coverity-709393)

11 years agofix memory leak if fail to alloc/init filter (coverity-714584)
Dan Dennedy [Fri, 17 Aug 2012 06:18:17 +0000 (23:18 -0700)]
fix memory leak if fail to alloc/init filter (coverity-714584)

11 years agofix memory leak if fail to alloc/init filter (coverity-714583)
Dan Dennedy [Fri, 17 Aug 2012 06:17:05 +0000 (23:17 -0700)]
fix memory leak if fail to alloc/init filter (coverity-714583)

11 years agofix resource leak on iconv (coverity-714582)
Dan Dennedy [Fri, 17 Aug 2012 06:11:47 +0000 (23:11 -0700)]
fix resource leak on iconv (coverity-714582)

11 years agofix A/V synch on more H.264 files (without B-frames)
Dan Dennedy [Wed, 15 Aug 2012 23:49:06 +0000 (16:49 -0700)]
fix A/V synch on more H.264 files (without B-frames)

reported by Jordan Keyes

11 years agoIncrease libavutil version required to use PIX_FMT_YUVA444P.
Brian Matherly [Tue, 14 Aug 2012 04:10:55 +0000 (23:10 -0500)]
Increase libavutil version required to use PIX_FMT_YUVA444P.

PIX_FMT_YUVA444P was added to ffmpeg in version 51.35.101 - and so the precompiler check was correctly set to that version. However, it has not yet been added to libav. And libav recently increased the libavutil version to 51.38.0. This causes a compilation error against libav master because the precompiler check passes, but PIX_FMT_YUVA444P is not defined.

The current libavutil versions are:
 * ffmpeg master: 51.69.100
 * ffmpeg 0.11:   51.54.100
 * libav  master: 51.38.0

This commit sets the precompiler to check against version 51.54.0. This will allow PIX_FMT_YUVA444P to be used when compiled against both ffmpeg master and ffmpeg 0.11 - while avoiding errors when compiling against libav master. However, if libav keeps incrementing the version without adding PIX_FMT_YUVA444P, this number may have to be increased again in the future.

11 years agofix reading properties file without trailing newline
Dan Dennedy [Sun, 12 Aug 2012 17:38:35 +0000 (10:38 -0700)]
fix reading properties file without trailing newline

11 years agofix melt progress display on Windows
Dan Dennedy [Sun, 12 Aug 2012 01:22:32 +0000 (18:22 -0700)]
fix melt progress display on Windows

11 years agofix -progress2 with pipe input
Dan Dennedy [Sat, 11 Aug 2012 17:24:02 +0000 (10:24 -0700)]
fix -progress2 with pipe input

11 years agofix melt progress indication on Windows with MELT_NOSDL
Dan Dennedy [Sat, 11 Aug 2012 07:22:05 +0000 (00:22 -0700)]
fix melt progress indication on Windows with MELT_NOSDL

11 years agolet melt be built without SDL on Windows
Dan Dennedy [Fri, 10 Aug 2012 07:07:08 +0000 (00:07 -0700)]
let melt be built without SDL on Windows

with -DMELT_NOSDL in CFLAGS

11 years agorelay first nested consumer's frame-show event instead of own
Dan Dennedy [Wed, 8 Aug 2012 07:38:06 +0000 (00:38 -0700)]
relay first nested consumer's frame-show event instead of own

11 years agofix integrity of images with multi consumer
Dan Dennedy [Wed, 8 Aug 2012 07:11:30 +0000 (00:11 -0700)]
fix integrity of images with multi consumer

11 years agofix seeking jack clients when seeking while paused
Dan Dennedy [Sun, 5 Aug 2012 21:00:18 +0000 (14:00 -0700)]
fix seeking jack clients when seeking while paused

11 years agoMerge pull request #10 from mcfrisk/coverity_review_fixes_v2
Dan Dennedy [Tue, 7 Aug 2012 04:17:46 +0000 (21:17 -0700)]
Merge pull request #10 from mcfrisk/coverity_review_fixes_v2

Coverity review fixes v2

11 years agovideostab/filter_videostab2.c: check for null
Mikko Rapeli [Wed, 1 Aug 2012 16:04:03 +0000 (18:04 +0200)]
videostab/filter_videostab2.c: check for null

Fixes Coverity CID 709405: Dereference before null check (REVERSE_INULL)
Directly dereferencing pointer "data".
244        data->stab = calloc( 1, sizeof(StabData) );
245        data->trans = calloc( 1, sizeof (TransformData) ) ;
Dereferencing "data" before a null check.
246        if ( data )

11 years agovideostab/filter_videostab*.c: check return value from mlt_filter_new()
Mikko Rapeli [Wed, 1 Aug 2012 15:44:20 +0000 (17:44 +0200)]
videostab/filter_videostab*.c: check return value from mlt_filter_new()

Fixes Coverity CID 709365 and 709366:
Dereference null return value (NULL_RETURNS)
Function "mlt_filter_new" returns null (checked 50 out of 52 times). [show details]
Assigning: "parent" = null return value from "mlt_filter_new".
201                mlt_filter parent = mlt_filter_new();
Dereferencing a null pointer "parent".
202                parent->child = self;

11 years agovideostab/filter_videostab*.c: check for null
Mikko Rapeli [Wed, 1 Aug 2012 15:41:33 +0000 (17:41 +0200)]
videostab/filter_videostab*.c: check for null

Fixes Coverity CID 709404:
Dereference before null check (REVERSE_INULL)
Dereferencing pointer "g". [show details]
 85        if ( !mlt_geometry_parse( g, vectors, length, -1, -1 ) )
...
Dereferencing "g" before a null check.
104        if ( g ) mlt_geometry_close( g );

11 years agosdl/consumer_sdl_still.c: use mutex when changing sdl_screen
Mikko Rapeli [Wed, 1 Aug 2012 15:28:49 +0000 (17:28 +0200)]
sdl/consumer_sdl_still.c: use mutex when changing sdl_screen

Fixes Coverity CID 709357: Data race condition (MISSING_LOCK)
Accessing variable "this->sdl_screen" (consumer_sdl_s.sdl_screen) requires the mlt_sdl_mutex lock.
230                this->sdl_screen = NULL;
...
Locking "mlt_sdl_mutex".
445                pthread_mutex_lock( &mlt_sdl_mutex );
consumer_sdl_s.sdl_screen is being accessed with lock "mlt_sdl_mutex" held.
446                this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
447                if ( consumer_get_dimensions( &this->window_width, &this->window_height ) )
448                        this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
449
450                uint32_t color = mlt_properties_get_int( this->properties, "window_background" );
451                if ( this->sdl_screen )
452                {
453                        SDL_FillRect( this->sdl_screen, NULL, color >> 8 );
454                        changed = 1;
455                }
456                pthread_mutex_unlock( &mlt_sdl_mutex );

11 years agosdl/consumer_sdl_preview.c: use mutex when changing refresh_count
Mikko Rapeli [Wed, 1 Aug 2012 15:21:51 +0000 (17:21 +0200)]
sdl/consumer_sdl_preview.c: use mutex when changing refresh_count

Fixes Coverity CID 709360: Data race condition (MISSING_LOCK)

Locking "this->refresh_mutex".
133                pthread_mutex_lock( &this->refresh_mutex );
consumer_sdl_s.refresh_count is being accessed with lock "this->refresh_mutex" held.
134                this->refresh_count = this->refresh_count <= 0 ? 1 : this->refresh_count + 1;
135                pthread_cond_broadcast( &this->refresh_cond );
136                pthread_mutex_unlock( &this->refresh_mutex );
...
Accessing variable "this->refresh_count" (consumer_sdl_s.refresh_count) requires the consumer_sdl_s.refresh_mutex lock.
295        this->refresh_count = 0;
...
Locking "this->refresh_mutex".
445                                pthread_mutex_lock( &this->refresh_mutex );
446                                if ( this->running && speed == 0 && this->refresh_count <= 0 )
447                                {
448                                        mlt_events_fire( properties, "consumer-sdl-paused", NULL );
449                                        pthread_cond_wait( &this->refresh_cond, &this->refresh_mutex );
450                                }
consumer_sdl_s.refresh_count is being accessed with lock "this->refresh_mutex" held.
451                                this->refresh_count --;
452                                pthread_mutex_unlock( &this->refresh_mutex );

11 years agosdl/consumer_sdl_preview.c: check for null pointer
Mikko Rapeli [Wed, 1 Aug 2012 15:19:12 +0000 (17:19 +0200)]
sdl/consumer_sdl_preview.c: check for null pointer

Fixes Coverity CID 709403: Dereference before null check (REVERSE_INULL)
Dereferencing pointer "this->play". [show details]
290        int eos_threshold = 20 + mlt_properties_get_int( MLT_CONSUMER_PROPERTIES( this->play ), "buffer" );
...
Assigning: "this->active" = "this->play".
424                                        this->active = this->play;
...
Dereferencing "this->play" before a null check.
466        if ( this->play ) mlt_consumer_stop( this->play );

11 years agosdl/consumer_sdl_audio.c: use mutex when changing refresh_count
Mikko Rapeli [Wed, 1 Aug 2012 13:42:10 +0000 (15:42 +0200)]
sdl/consumer_sdl_audio.c: use mutex when changing refresh_count

Fixes Coverity CID 709359: Data race condition (MISSING_LOCK)

Locking "self->refresh_mutex".
145                pthread_mutex_lock( &self->refresh_mutex );
consumer_sdl_s.refresh_count is being accessed with lock "self->refresh_mutex" held.
146                self->refresh_count = self->refresh_count <= 0 ? 1 : self->refresh_count + 1;
147                pthread_cond_broadcast( &self->refresh_cond );
148                pthread_mutex_unlock( &self->refresh_mutex );
...
Accessing variable "self->refresh_count" (consumer_sdl_s.refresh_count) requires the consumer_sdl_s.refresh_mutex lock.
478        self->refresh_count = 0;
...
Locking "self->refresh_mutex".
535                                pthread_mutex_lock( &self->refresh_mutex );
536                                if ( refresh == 0 && self->refresh_count <= 0 )
537                                {
538                                        consumer_play_video( self, frame );
539                                        pthread_cond_wait( &self->refresh_cond, &self->refresh_mutex );
540                                }
541                                mlt_frame_close( frame );
consumer_sdl_s.refresh_count is being accessed with lock "self->refresh_mutex" held.
542                                self->refresh_count --;
543                                pthread_mutex_unlock( &self->refresh_mutex );

11 years agosdl/consumer_sdl.c: use mutex when changing sdl_screen
Mikko Rapeli [Wed, 1 Aug 2012 13:20:13 +0000 (15:20 +0200)]
sdl/consumer_sdl.c: use mutex when changing sdl_screen

Fixes Coverity CID 709357 and 709358: Data race condition (MISSING_LOCK)

Locking "mlt_sdl_mutex".
235                        pthread_mutex_lock( &mlt_sdl_mutex );
consumer_sdl_s.sdl_screen is being accessed with lock "mlt_sdl_mutex" held.
236                        this->sdl_screen = SDL_GetVideoSurface( );
237                        pthread_mutex_unlock( &mlt_sdl_mutex );
...
Locking "mlt_sdl_mutex".
269                        pthread_mutex_lock( &mlt_sdl_mutex );
consumer_sdl_s.sdl_screen is being accessed with lock "mlt_sdl_mutex" held.
270                        this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, 0, this->sdl_flags );
271                        pthread_mutex_unlock( &mlt_sdl_mutex );
...
Accessing variable "this->sdl_screen" (consumer_sdl_s.sdl_screen) requires the mlt_sdl_mutex lock.
315                this->sdl_screen = NULL;
...
Locking "mlt_sdl_mutex".
573                        pthread_mutex_lock( &mlt_sdl_mutex );
consumer_sdl_s.sdl_screen is being accessed with lock "mlt_sdl_mutex" held.
574                        this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, this->bpp, this->sdl_flags );
575                        if ( consumer_get_dimensions( &this->window_width, &this->window_height ) )
consumer_sdl_s.sdl_screen is being accessed with lock "mlt_sdl_mutex" held.
576                                this->sdl_screen = SDL_SetVideoMode( this->window_width, this->window_height, this->bpp, this->sdl_flags );
577                        pthread_mutex_unlock( &mlt_sdl_mutex );

11 years agortaudio/consumer_rtaudio.cpp: use mutex when changing refresh_count
Mikko Rapeli [Wed, 1 Aug 2012 13:06:22 +0000 (15:06 +0200)]
rtaudio/consumer_rtaudio.cpp: use mutex when changing refresh_count

Fixes Coverity CID 710859: Data race condition (MISSING_LOCK)
Accessing variable "this->refresh_count" (RtAudioConsumer.refresh_count) requires the RtAudioConsumer.refresh_mutex lock.
225                refresh_count = 0;
...
Locking "this->refresh_mutex".
282                                        pthread_mutex_lock( &refresh_mutex );
283                                        if ( refresh == 0 && refresh_count <= 0 )
284                                        {
285                                                play_video( frame );
286                                                pthread_cond_wait( &refresh_cond, &refresh_mutex );
287                                        }
288                                        mlt_frame_close( frame );
RtAudioConsumer.refresh_count is being accessed with lock "this->refresh_mutex" held.
289                                        refresh_count --;
290                                        pthread_mutex_unlock( &refresh_mutex );
...
Locking "rtaudio->refresh_mutex".
561                pthread_mutex_lock( &rtaudio->refresh_mutex );
RtAudioConsumer.refresh_count is being accessed with lock "rtaudio->refresh_mutex" held.
562                rtaudio->refresh_count = rtaudio->refresh_count <= 0 ? 1 : rtaudio->refresh_count + 1;
563                pthread_cond_broadcast( &rtaudio->refresh_cond );
564                pthread_mutex_unlock( &rtaudio->refresh_mutex );

11 years agortaudio/consumer_rtaudio.cpp: initialize variables
Mikko Rapeli [Wed, 1 Aug 2012 08:19:28 +0000 (10:19 +0200)]
rtaudio/consumer_rtaudio.cpp: initialize variables

Fixes Coverty CID 710879: Uninitialized pointer field (UNINIT_CTOR)

n-static class member ""queue"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.child" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.close" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.event_listener" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.is_stopped" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.local" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.put" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.queue" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.start" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.stop" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.threads" is not initialized in this constructor nor in any functions that it calls.
Non-static class member field "consumer.worker_threads" is not initialized in this constructor nor in any functions that it calls.

11 years agortaudio/RtAudio.h: initialize variables
Mikko Rapeli [Tue, 31 Jul 2012 12:11:13 +0000 (14:11 +0200)]
rtaudio/RtAudio.h: initialize variables

Fixes Coverity CID 710878: Uninitialized scalar field (UNINIT_CTOR)
Non-static class member ""bufferSize"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""channelOffset"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""deviceFormat"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""deviceInterleaved"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""doByteSwap"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""doConvertBuffer"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""latency"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""mode"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""nBuffers"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""nDeviceChannels"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""nUserChannels"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""sampleRate"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""state"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""streamTime"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""userBuffer"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""userFormat"" is not initialized in this constructor nor in any functions that it calls.
Non-static class member ""userInterleaved"" is not initialized in this constructor nor in any functions that it calls.
654      :apiHandle(0), deviceBuffer(0) { device[0] = 11111; device[1] = 11111; }

11 years agortaudio/RtAudio.h: initialize variable
Mikko Rapeli [Tue, 31 Jul 2012 11:41:03 +0000 (13:41 +0200)]
rtaudio/RtAudio.h: initialize variable

Fixes Coverity CID 710877: Uninitialized scalar field (UNINIT_CTOR)
Class member declaration for ""thread"".
535  ThreadHandle thread;
...
Non-static class member ""thread"" is not initialized in this constructor nor in any functions that it calls.
543    :object(0), callback(0), userData(0), apiInfo(0), isRunning(false) {}

11 years agortaudio/RtAudio.cpp: check for null pointer
Mikko Rapeli [Tue, 31 Jul 2012 11:36:57 +0000 (13:36 +0200)]
rtaudio/RtAudio.cpp: check for null pointer

Fixes Coverity CID 710858: Dereference after null check (FORWARD_NULL)
Comparing "this->rtapi_" to null implies that "this->rtapi_" might be null.
 146    if ( rtapi_ ) return;
...
Passing null variable "this->rtapi_" to function "RtApi::getDeviceCount()", which dereferences it. (The dereference happens because this is a virtual function call.)
 159    if ( rtapi_->getDeviceCount() ) break;

11 years agoqimage/producer_kdenlivetitle.c: add error handling
Mikko Rapeli [Tue, 31 Jul 2012 11:23:00 +0000 (13:23 +0200)]
qimage/producer_kdenlivetitle.c: add error handling

Fixes Coverity CID 709363: Argument cannot be negative (NEGATIVE_RETURNS)
Function "ftell(f)" returns a negative number.
Assigning: signed variable "lSize" = "ftell".
 37                lSize = ftell (f);
 38                rewind (f);
 39
 40                char *infile = (char*) mlt_pool_alloc(lSize);
"lSize" is passed to a parameter that cannot be negative.

and compiler warning:

producer_kdenlivetitle.c: In function ‘read_xml’:
producer_kdenlivetitle.c:49:19: warning: ‘infile’ may be used uninitialized in this function [-Wmaybe-uninitialized]

11 years agoqimage/kdenlivetitle_wrapper.cpp: check for division by zero
Mikko Rapeli [Tue, 31 Jul 2012 09:59:17 +0000 (11:59 +0200)]
qimage/kdenlivetitle_wrapper.cpp: check for division by zero

Fixes Coverity CID 709345: Division or modulo by zero (DIVIDE_BY_ZERO)
Assigning: "anim_out" = "mlt_properties_get_position(producer_props, "_animation_out")".
On this path, function call "mlt_properties_get_position(producer_props, "_animation_out")" has return value of 0
465                mlt_position anim_out = mlt_properties_get_position( producer_props, "_animation_out" );
...
Division by expression "anim_out" which may be zero has undefined behavior
475                        double percentage = position / anim_out;

11 years agoplus/filter_affine.c: check for null pointer
Mikko Rapeli [Tue, 31 Jul 2012 09:55:08 +0000 (11:55 +0200)]
plus/filter_affine.c: check for null pointer

Fixes Coverity CID 709402: Dereference before null check (REVERSE_INULL)
Dereferencing pointer "transition". [show details]
 64                        mlt_properties_set_int( MLT_TRANSITION_PROPERTIES( transition ), "b_alpha", 1 );
 65                }
 66
Dereferencing "transition" before a null check.
 67                if ( producer != NULL && transition != NULL )