]> git.sesse.net Git - mlt/commitdiff
Makefile error handling and consumer avformat cleanup
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 13 Apr 2004 18:57:06 +0000 (18:57 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Tue, 13 Apr 2004 18:57:06 +0000 (18:57 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@275 d19143bc-622f-0410-bfdd-b5b2a6649095

Makefile
src/framework/mlt_frame.c
src/modules/Makefile
src/modules/avformat/consumer_avformat.c

index c891dd92906f4df4b65c9b4ceb41da35bc561c0c..01259e9d43799ed95b2eec635e28a1febef16ef1 100644 (file)
--- 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
index 4d582328b6beb7ed2d6b6ce0cb88a1a2da91d26e..ba33172728a976a7c5cb21888ba2871a63e1964d 100644 (file)
@@ -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;
 
index f30531ccfa7428efb6f72eaf56e7e569c1d53fac..d9722adf1892b71849f18dc406d31c3a2b31f283 100644 (file)
@@ -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
 
index a841339e12efef526caddbe0017e62dd603a5cae..cf31d58cfe372c6f5b70b3351abc77812b4d3e16 100644 (file)
@@ -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;