~ubuntu-branches/ubuntu/jaunty/avidemux/jaunty

« back to all changes in this revision

Viewing changes to avidemux/ADM_outputs/oplug_avi/op_avisave.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessio Treglia
  • Date: 2009-02-17 23:41:46 UTC
  • mfrom: (1.1.12 upstream)
  • Revision ID: james.westby@ubuntu.com-20090217234146-eakx254awuch4wgw
Tags: 1:2.4.4-0.0ubuntu1
* Merge from debian multimedia, Ubuntu remaining changes:
  - debian/control:
    + Build-Depends on newer libx264-dev.
    + Don't Build-Depends on ccache and libamrnb-dev.
    + Build-Depends on libpulse-dev.
    + Fixed small typo in avidemux description.
  - Don't use ccache.
  - Drop patch to fix build with newer x264, it has been merged by upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
135
135
 _pq=NULL;
136
136
 memset(&_context,0,sizeof(_context));
137
137
 _context.audioDone=1;
 
138
 _encode=NULL;
138
139
}
139
140
 
140
141
GenericAviSave::~GenericAviSave ()
209
210
  //__________________________________
210
211
  //   now go to main loop.....
211
212
  //__________________________________
 
213
  int frameDelay = 0;
 
214
  int videoSize;
 
215
 
212
216
  for (uint32_t cf = 0; cf < frametogo; cf++) 
213
 
    {
214
 
                        
215
 
                        
216
 
                        
217
 
                        if (guiUpdate (cf, frametogo))
218
 
                                        goto abortme;
219
 
                        //   printf("\n %lu / %lu",cf,frametogo);
220
 
                        writeVideoChunk (cf);
221
 
                        writeAudioChunk (cf);
222
 
                        //writter->sync();
223
 
     
224
 
     
225
 
    };                          // end for
 
217
  {
 
218
          if (guiUpdate(cf, frametogo))
 
219
                  goto abortme;
 
220
 
 
221
          for (;;)
 
222
          {
 
223
                  videoSize = writeVideoChunk(cf + frameDelay);
 
224
 
 
225
                  if (videoSize == 0 && _encode && (_encode->getRequirements() & ADM_ENC_REQ_NULL_FLUSH))
 
226
                  {
 
227
                          printf("skipping frame: %u size: %i\n", cf + frameDelay, videoSize);
 
228
                          frameDelay++;
 
229
                  }
 
230
                  else
 
231
                          break;
 
232
          }
 
233
 
 
234
          writeAudioChunk(cf);
 
235
  }
 
236
 
226
237
    ret=1;
227
238
abortme:
228
239
  guiStop ();