]> git.sesse.net Git - mlt/commitdiff
Fix sdi sample count to be recomputed on each iteration.
authorDan Dennedy <dan@dennedy.org>
Wed, 16 Jun 2010 04:56:43 +0000 (21:56 -0700)
committerDan Dennedy <dan@dennedy.org>
Wed, 16 Jun 2010 04:56:43 +0000 (21:56 -0700)
src/modules/linsys/consumer_SDIstream.c

index 9f0e09365409a6727ffefdec130ea3797195926f..aa251c22308d23ef27fb9012cf4cbf609b50e467 100644 (file)
@@ -408,7 +408,7 @@ static void *consumer_thread(void *arg) {
        // Tell the framework how we want our audio and video
        int frequency = this->audio_format.sample_rate;
        int channels = 0;
-       int samples = mlt_sample_calculator(fps, frequency, count++);
+       int samples;
 
        // set number of audio channels, linsys vidport model 193 is limited to 8 channels (4AES frames)
        this->audio_format.channels = 8; /* 0,2,4,6,8 */
@@ -445,6 +445,7 @@ static void *consumer_thread(void *arg) {
                                mlt_frame_get_image(frame, &video_buffer, &this->pix_fmt, &this->width, &this->height, 1);
 
                                // Get the audio from this frame and save it to our audio_buffer
+                               samples = mlt_sample_calculator(fps, frequency, count++);
                                mlt_frame_get_audio(frame, (void**) &audio_buffer_tmp, &this->audio_format.aformat, &frequency, &channels, &samples);
 
                                this->audio_format.sample_rate = frequency;