Advertisement
elvman

Untitled

Nov 9th, 2015
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 KB | None | 0 0
  1. #if HAVE_PTHREADS
  2.     if (nb_input_files > 1)
  3.     {
  4.         f = output_files[ost->file_index];
  5.        
  6.         if (f->finished)
  7.             return;
  8.        
  9.         pthread_mutex_lock(&f->fifo_lock);
  10.         while (!av_fifo_space(f->fifo)) {
  11.             ret = av_fifo_realloc2(f->fifo, av_fifo_size(f->fifo) * 2);
  12.            
  13.             if (ret < 0) {
  14.                 print_error("av_fifo_realloc2()", ret);
  15.                 exit_program(1);
  16.             }
  17.         }
  18.        
  19.         av_fifo_generic_write(f->fifo, &pkt, sizeof(pkt), NULL);
  20.        
  21.         pthread_mutex_unlock(&f->fifo_lock);
  22.        
  23.         return;
  24.     }
  25. #else
  26.     ret = av_interleaved_write_frame(s, pkt);
  27.     if (ret < 0) {
  28.         print_error("av_interleaved_write_frame()", ret);
  29.         exit_program(1);
  30.     }
  31. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement