Permalink
Browse files

Make xml consumer respect video_off and audio_off.

  • Loading branch information...
1 parent e1f47db commit f6834f06f01155e42b60958636f957546c542aa6 @ddennedy ddennedy committed Nov 10, 2013
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/modules/xml/consumer_xml.c
@@ -920,6 +920,9 @@ static void *consumer_thread( void *arg )
// Frame and size
mlt_frame frame = NULL;
+ int video_off = mlt_properties_get_int( properties, "video_off" );
+ int audio_off = mlt_properties_get_int( properties, "audio_off" );
+
// Loop while running
while( !terminated && mlt_properties_get_int( properties, "running" ) )
{
@@ -941,8 +944,10 @@ static void *consumer_thread( void *arg )
mlt_audio_format aformat = mlt_audio_s16;
uint8_t *buffer;
- mlt_frame_get_image( frame, &buffer, &iformat, &width, &height, 0 );
- mlt_frame_get_audio( frame, (void**) &buffer, &aformat, &frequency, &channels, &samples );
+ if ( !video_off )
+ mlt_frame_get_image( frame, &buffer, &iformat, &width, &height, 0 );
+ if ( !audio_off )
+ mlt_frame_get_audio( frame, (void**) &buffer, &aformat, &frequency, &channels, &samples );
// Close the frame
mlt_events_fire( properties, "consumer-frame-show", frame, NULL );

0 comments on commit f6834f0

Please sign in to comment.