func: static void flush_encoders() int i ; for (i = 0; i < nb_output_streams; i++) OutputStream * ost = output_streams [ i ] ; AVCodecContext * enc = ost -> st -> codec ; AVFormatContext * os = output_files [ ost -> file_index ] -> ctx ; int stop_encoding = 0 ; if ( ! ost -> encoding_needed )  if ( ( ost -> st -> codec -> codec_type ) == AVMEDIA_TYPE_AUDIO && enc -> frame_size <= 1 )  if ( ( ost -> st -> codec -> codec_type ) == AVMEDIA_TYPE_VIDEO && os -> oformat -> flags & 0x20 && ( enc -> codec -> id ) == AV_CODEC_ID_RAWVIDEO )  switch ( ost -> st -> codec -> codec_type )  encode = avcodec_encode_audio2; encode = avcodec_encode_video2; stop_encoding = 1; if ( encode )  int got_packet ; update_benchmark ( ( ( void * ) 0 ) ); if ( ! got_packet )  stop_encoding = 1; if ( stop_encoding )  static void update_benchmark(const char *fmt,... ) if ( do_benchmark_all )  va_list va ; char buf [ 1024 ] ; if ( fmt )  vsnprintf ( buf , sizeof ( buf ) , fmt , va ); printf ( "bench: %8lu %s \n" , t - current_time , buf ); 