]> git.sesse.net Git - mlt/blobdiff - src/modules/core/producer_ppm.c
initialize audio_position so first call to get_audio works
[mlt] / src / modules / core / producer_ppm.c
index aeb3591256cebe347fc0cc7ed2afb698879326ba..929d663369ec0c038337a91f98c70bdd00fc6d1d 100644 (file)
@@ -163,12 +163,12 @@ static int producer_get_audio( mlt_frame this, int16_t **buffer, mlt_audio_forma
                
        // Read it
        if ( pipe != NULL )
-               fread( *buffer, size, 1, pipe );
+               size = fread( *buffer, size, 1, pipe );
        else
                memset( *buffer, 0, size );
 
        // Pass the data on the frame properties
-       mlt_properties_set_data( properties, "audio", *buffer, size, free, NULL );
+       mlt_frame_set_audio( this, *buffer, *format, size, free );
 
        return 0;
 }
@@ -178,10 +178,10 @@ static int read_ppm_header( FILE *video, int *width, int *height )
        int count = 0;
        {
                char temp[ 132 ];
-               fgets( temp, 132, video );
-               fgets( temp, 132, video );
+               char *ignore = fgets( temp, 132, video );
+               ignore = fgets( temp, 132, video );
                count += sscanf( temp, "%d %d", width, height );
-               fgets( temp, 132, video );
+               ignore = fgets( temp, 132, video );
        }
        return count;
 }
@@ -211,7 +211,8 @@ static int producer_get_frame( mlt_producer producer, mlt_frame_ptr frame, int i
                uint8_t *image = mlt_pool_alloc( width * ( height + 1 ) * 3 );
                
                // Read it
-               fread( image, width * height * 3, 1, video );
+               size_t ignore;
+               ignore = fread( image, width * height * 3, 1, video );
 
                // Pass the data on the frame properties
                mlt_frame_set_image( *frame, image, width * ( height + 1 ) * 3, mlt_pool_release );