From: lilo_booter Date: Tue, 13 Apr 2004 18:57:06 +0000 (+0000) Subject: Makefile error handling and consumer avformat cleanup X-Git-Url: http://research.m1stereo.tv/gitweb?a=commitdiff_plain;h=ccb141370c67b8c328244dc8931692f5d3722266;p=melted Makefile error handling and consumer avformat cleanup git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@275 d19143bc-622f-0410-bfdd-b5b2a6649095 --- diff --git a/Makefile b/Makefile index c891dd9..01259e9 100644 --- a/Makefile +++ b/Makefile @@ -11,18 +11,17 @@ SUBDIRS = src/framework \ all clean depend: list='$(SUBDIRS)'; \ for subdir in $$list; do \ - $(MAKE) -C $$subdir $@; \ + $(MAKE) -C $$subdir $@ || exit 1; \ done dist-clean: rm mlt-config packages.dat; \ list='$(SUBDIRS)'; \ for subdir in $$list; do \ - $(MAKE) -C $$subdir $@; \ + $(MAKE) -C $$subdir $@ || exit 1; \ done; \ rm config.mak; - install: install -d "$(prefix)/bin" install -d "$(prefix)/include" @@ -34,6 +33,6 @@ install: install -m 644 packages.dat "$(prefix)/share/mlt/" list='$(SUBDIRS)'; \ for subdir in $$list; do \ - $(MAKE) -C $$subdir $@; \ + $(MAKE) -C $$subdir $@ || exit 1; \ done; \ /sbin/ldconfig || true diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index 4d58232..ba33172 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -729,7 +729,7 @@ int mlt_sample_calculator( float fps, int frequency, int64_t position ) { int samples = 0; - if ( fps > 29 && fps <= 30 ) + if ( ( int )( fps * 100 ) == 2997 ) { samples = frequency / 30; diff --git a/src/modules/Makefile b/src/modules/Makefile index f30531c..d9722ad 100644 --- a/src/modules/Makefile +++ b/src/modules/Makefile @@ -6,7 +6,7 @@ all clean depend: list='$(SUBDIRS)'; \ for subdir in $$list; do \ if [ -f $$subdir/Makefile ] ; \ - then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@; \ + then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \ fi \ done @@ -15,7 +15,7 @@ dist-clean: list='$(SUBDIRS)'; \ for subdir in $$list; do \ if [ -f $$subdir/Makefile ] ; \ - then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@; \ + then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \ fi \ done @@ -24,7 +24,7 @@ install: list='$(SUBDIRS)'; \ for subdir in $$list; do \ if [ -f $$subdir/Makefile ] ; \ - then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@; \ + then [ ! -f disable-$$subdir ] && $(MAKE) -C $$subdir $@ || exit 1; \ fi \ done diff --git a/src/modules/avformat/consumer_avformat.c b/src/modules/avformat/consumer_avformat.c index a841339..cf31d58 100644 --- a/src/modules/avformat/consumer_avformat.c +++ b/src/modules/avformat/consumer_avformat.c @@ -96,10 +96,10 @@ static void consumer_close( mlt_consumer this ); mlt_consumer consumer_avformat_init( char *arg ) { // Allocate the consumer - mlt_consumer this = calloc( 1, sizeof( struct mlt_consumer_s ) ); + mlt_consumer this = mlt_consumer_new( ); // If memory allocated and initialises without error - if ( this != NULL && mlt_consumer_init( this, NULL ) == 0 ) + if ( this != NULL ) { // Get properties from the consumer mlt_properties properties = mlt_consumer_properties( this ); @@ -134,12 +134,6 @@ mlt_consumer consumer_avformat_init( char *arg ) this->stop = consumer_stop; this->is_stopped = consumer_is_stopped; } - else - { - // Clean up in case of init failure - free( this ); - this = NULL; - } // Return this return this;